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.
$ python -m SimpleHTTPServer 8000| #!/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> |
| #!/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, |
| /* 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 { |
| /*\ | |
| 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(){ |
| #!/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`} |
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.
$ python -m SimpleHTTPServer 8000| require 'webrick' | |
| require 'fileutils' | |
| if ARGV.length != 0 | |
| root = ARGV.first.gsub('\\', '/') | |
| else | |
| root = '.' | |
| end | |
| BACKUP_DIR = 'bak' |
| #!/usr/bin/env bash | |
| # Purpose: Provide HTTP server that displays the current server date to | |
| # validate the artifact structure and play with. | |
| declare -a _http_responses=( | |
| [200]="OK" | |
| [201]="Created" | |
| [202]="Accepted" | |
| [204]="No Content" | |
| [301]="Moved Permanently" |
| #!/usr/bin/env bash | |
| # HTTP web service implemented in socat + bash | |
| # Usage: socat -T 1 -d -d tcp-l:8080,reuseaddr,fork,crlf exec:./server | |
| # Purpose: Provide an HTTP server that displays the current server date, | |
| # to validate the artifact structure and play with it. | |
| # Note: socat crlf option is translating all our \n to \r\n on output. | |
| http_version="1.0" | |
| declare -a _http_responses=( |