This document is still a scratch
You’ll want a directory to do this in so that you don’t screw up your machine.
import re | |
from hashlib import md5 | |
def gfm(text): | |
# Extract pre blocks. | |
extractions = {} | |
def pre_extraction_callback(matchobj): | |
digest = md5(matchobj.group(0)).hexdigest() | |
extractions[digest] = matchobj.group(0) | |
return "{gfm-extraction-%s}" % digest |
# the following two lines give a two-line status, with the current window highlighted | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | |
# huge scrollback buffer | |
defscrollback 5000 | |
# no welcome message | |
startup_message off |
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
[www] | |
ping.path = /ping |
Work in progress, I'll write this up properly when I'm done.
Almost all credit goes to @maxogden for putting me on to this and pointing me in the right direction for each of these items.
Prerequisites:
/** | |
* GenPAC 0.2.1 http://jeeker.net/projects/genpac/ | |
* Generated: Fri, 17 May 2013 14:15:55 GMT | |
* GFWList Last-Modified: Fri, 17 May 2013 12:41:31 GMT | |
*/ | |
// proxy | |
var P = "PROXY 192.168.1.1:8118; DIRECT"; | |
// user rules |
# Changing iTerm2 color in MacOSX when SSHing (so you know at a glance that you're no longer in Kansas) | |
# Adapted from https://gist.github.com/porras/5856906 | |
# 1. Create a theme in your terminal setting with the name "SSH" and the desired colors, background, etc. | |
# 2. Add this to your .bash_profile (or .bashrc, I always forget the difference ;)) | |
# 3. Optional but useful: in the terminal, go to Settings > Startup and set "New tabs open with" to | |
# "default settings" (otherwise, if you open a new tab from the changed one, you get a local tab with | |
# the SSH colors) | |
function tabc() { | |
NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi # if you have trouble with this, change |
Hey there, apparently people are still using this Gist from 2013! It's out of date! Consult the Github docs.
# Requires poster https://pypi.python.org/pypi/poster/ | |
# Requires webapp2 on App Engine for demo | |
# Example usage: | |
# import requests | |
# 'http://upload.wikimedia.org/math/4/7/9/479d9d21b183eb546b771447fcf69ddf.png' | |
# response = requests.post('http://myapp.appspot.com/i/post_from_url', {'url': wikipediaimg}) | |
import json |