Skip to content

Instantly share code, notes, and snippets.

View dubiouscript's full-sized avatar

dubiouscript

  • ./
View GitHub Profile
@dubiouscript
dubiouscript / bash_pager.sh
Last active December 9, 2022 10:18 — forked from SomeCrazyGuy/bash_pager.sh
A pager written entirely using bash 4 builtins, relies on no other system binaries.
#!/bin/bash --noprofile
# DO ALMOST ANYTHING PUBLIC LICENSE
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this code for any purpose as long as any "Credit"
# lines are not removed.
#Credit: /u/linuxversion
# add pipes : https://old.reddit.com/r/commandline/comments/4ct8px/i_wrote_a_pager_purely_in_bash_using_just_bash/d1lyq9q/
#<your Credit line here, if you want>
@dubiouscript
dubiouscript / call_graph.awk
Created December 17, 2021 07:51 — forked from tylerneylon/call_graph.awk
Parse Lua code and draw its call graph.
#!/usr/bin/awk -f
#
# call_graph.awk
#
# Usage:
# ./call_graph.awk my_program.lua | dot -Tpng > call_graph.png
#
# This is a script that generates a visual call graph
# for a Lua file. This script only shows calls made
# to functions defined within the input Lua file; that is,
#!/usr/bin/env python3
#
# https://raw.githubusercontent.com/jarun/googler/7e725573f801c587df7688a07f9fc7a9408d76eb/googler
#
# Copyright © 2008 Henri Hakkinen
# Copyright © 2015-2019 Arun Prakash Jana <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@dubiouscript
dubiouscript / dabblet.css
Created July 5, 2019 14:42 — forked from GeorgeTzellis/dabblet.css
HTML source viewer
/* HTML source viewer */
body { margin: 3em;}
::before { content: open-quote '>'; }
[id]::before { content: open-quote ' id="'attr(id) '">'; }
[class]::before { content: open-quote ' class="'attr(class)'">'; }
[id][class]::before { content: open-quote ' id="'attr(id)'" class="'attr(class)'">'; }
::after { content: close-quote ; }
html::before, html::after,
body::before, body::after {
@dubiouscript
dubiouscript / bashttpd
Last active August 27, 2021 18:52
web server written in bash
#!/usr/bin/env bash
#
###
# https://gist.github.com/dubiouscript/e90a515b6ee2b5fe8988b945b0cdb418#this
#
# https://raw.githubusercontent.com/TooTallNate/bashttpd/master/bashttpd#origin
#
# https://raw.githubusercontent.com/TooTallNate/bashttpd/79582483264acad15b49e4b911f17f7bda753f43/bashttpd
###
#
/*\
title: $:/plugins/jayfresh/tiddler-server/tiddler-server.js
type: application/javascript
module-type: command
A server command to serve tiddlers as HTML as well as the main server API
\*/
(function(){
@dubiouscript
dubiouscript / iamafi.sh
Last active June 17, 2019 16:45
datamonger-er-ing
ok.sh -j list_releases Jermolene TiddlyWiki5
[
]
... -x $(which ok.sh) ..
# https://github.com/go-gitea/gitea/issues/2738#API support for listing tags and fetching tag details
# https://github.com/go-gitea/gitea/issues/2738#issuecomment-497767418
@dubiouscript
dubiouscript / mime.sh
Created June 10, 2019 16:00 — forked from markusfisch/mime.sh
bash functions to dump and inspect a message in MIME format
#!/usr/bin/env bash
##############################################################################
#### MIME interface
##############################################################################
# Parse message in MIME format and create a temporary cache directory
mime_parse()
{
MIME_CACHE=${MIME_CACHE:-`mktemp -d ${BIN}.XXXXXXXXXX`}
@dubiouscript
dubiouscript / web-servers.md
Created June 3, 2019 10:56 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@dubiouscript
dubiouscript / tw5-server.rb
Created May 26, 2019 15:12 — forked from jimfoltz/tw5-server.rb
A local server for TiddlyWiki5 that allows saving wiki.
require 'webrick'
require 'fileutils'
if ARGV.length != 0
root = ARGV.first.gsub('\\', '/')
else
root = '.'
end
BACKUP_DIR = 'bak'