See https://flask.readthedocs.org/en/0.1/quickstart/ for more.
import flask
app = flask.Flask(__name__)
@app.route('/')
def index():
| #!/bin/bash -x | |
| set -o pipefail | |
| api_v="1.21" | |
| call_docker() { | |
| local uuid=$(uuid) | |
| /opt/pkg/bin/curl -k -si \ | |
| --cert ${DOCKER_CERT_PATH}/cert.pem \ |
| #!/usr/bin/env python2.7 | |
| # Matt's DNS management tool | |
| # Manage DNS using DDNS features | |
| # | |
| # See http://planetfoo.org/blog/archive/2012/01/24/a-better-nsupdate/ | |
| # | |
| # Usage: dnsupdate -s server -k key -t ttl add _minecraft._tcp.mc.example.com SRV 0 0 25566 mc.example.com. | |
| # -h HELP! | |
| # -s the server | |
| # -k the key |
See https://flask.readthedocs.org/en/0.1/quickstart/ for more.
import flask
app = flask.Flask(__name__)
@app.route('/')
def index():
| log_format bunyan '{' | |
| '"name": "nginx/$nginx_version",' | |
| '"hostname": "$hostname",' | |
| '"pid": "$pid",' | |
| '"level": 30,' | |
| '"time": "$time_iso8601",' | |
| '"v": 0,' | |
| '"msg": "access",' | |
| '"remoteAddress": "$remote_addr",' |
| #!/bin/bash | |
| # This little hack-job will grab credentials from a running openvpn process in Linux | |
| # Keep in mind this won't work if the user used the --auth-nocache flag | |
| grep rw-p /proc/$1/maps | sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' | while read start stop; do gdb --batch-silent --silent --pid $1 -ex "dump memory $1-$start-$stop.dump 0x$start 0x$stop"; done | |
| echo "Your credentials should be listed below as username/password" | |
| strings *.dump | grep -B2 KnOQ | grep -v KnOQ | |
| rm *.dump --force |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
| #!/usr/bin/env node | |
| var util = require("util"); | |
| var source = [ | |
| '#!/usr/bin/env node', | |
| '', | |
| 'var util = require("util");', | |
| '', | |
| 'var source = [', |
| #!/usr/bin/env bash | |
| s=( | |
| '#!/usr/bin/env bash' | |
| '' | |
| 's=(' | |
| ')' | |
| '' | |
| 'q=$(printf "\x27")' | |
| 'for ((i = 0; i < 3; i++ )); do' |
| $ echo quote what? ; read quoteme ; printf %q "$quoteme" ; echo | |
| quote what? | |
| The horse said "$)#*@(!!%" when he stubbed his hoof. | |
| The\ horse\ said\ \"\$\)#\*@\(\!\!%\"\ when\ he\ stubbed\ his\ hoof. | |
| $ |