This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Use socat to proxy git through an HTTP CONNECT firewall. | |
# Useful if you are trying to clone git:// from inside a company. | |
# Requires that the proxy allows CONNECT to port 9418. | |
# | |
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run | |
# chmod +x gitproxy | |
# git config --global core.gitproxy gitproxy | |
# | |
# More details at http://tinyurl.com/8xvpny |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This stylesheet will work pretty well with a regular Org Mode HTML export. | |
* However, you do have to turn off all of the defaults: | |
* | |
* (setq org-export-html-style-include-scripts nil | |
* org-export-html-style-include-default nil) | |
* | |
* and insert a call to the stylesheet: | |
* | |
* (setq org-export-html-style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString *NSStringFromOSStatus(OSStatus errCode) | |
{ | |
if (errCode == noErr) | |
return @"noErr"; | |
char message[5] = {0}; | |
*(UInt32*) message = CFSwapInt32HostToBig(errCode); | |
return [NSString stringWithCString:message encoding:NSASCIIStringEncoding]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -wKU | |
# Adapted from Brett Terpstra’s original “Markdown to Evernote” service (http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/) | |
# Martin Kopischke 2011 – License: Creative Commons Attribution Share-Alike (CC BY-SA) 3.0 Unported (http://creativecommons.org/licenses/by-sa/3.0/) | |
# Changes: – create only one Evernote note per (Multi)Markdown input passed (instead of one per line) | |
# – do not choke on shell escape characters (use Tempfile instead of shell pipe for osascript) | |
# – default to MultiMarkdown 3 executable (instead of MMD 2 Perl script) | |
# – make smart typography processing optional (set SMARTY to 'false' to bypass processing; | |
# note smart typography cannot be disabled in MMD 3.0 and 3.0.1 | |
# – handle both smart typography processing scripts (ie. SmartyPants.pl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from geventwebsocket.handler import WebSocketHandler | |
from gevent.pywsgi import WSGIServer | |
from flask import Flask, request, render_template | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return render_template('index.html') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tornado.web | |
import tornado.ioloop | |
import logging | |
import os.path | |
def clean_filename(filename): | |
i = filename.rfind(".") | |
if i != -1: | |
filename = filename[0:i] + filename[i:].lower() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
digraph models_diagram { | |
graph[overlap=false, splines=true] | |
"Venue" [shape=record, label="{\ | |
Venue|name :string\l\ | |
}"] | |
"User" [shape=record, label="{User|\ | |
email :string\l\ | |
password :string\l\ | |
}"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -20,9 +20,10 @@ blog_index_dir = 'source' # directory for your blog's index pa | |
deploy_dir = "_deploy" # deploy directory (for Github pages deployment) | |
stash_dir = "_stash" # directory to stash posts for speedy generation | |
posts_dir = "_posts" # directory for blog files | |
+org_posts_dir = "org_posts" | |
themes_dir = ".themes" # directory for blog files | |
-new_post_ext = "markdown" # default new post file extension when using the new_p | |
-new_page_ext = "markdown" # default new page file extension when using the new_p | |
+new_post_ext = "org" # default new post file extension when using the new_post t | |
+new_page_ext = "org" # default new page file extension when using the new_page t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Pychecker < Formula | |
url 'http://downloads.sourceforge.net/project/pychecker/pychecker/0.8.19/pychecker-0.8.19.tar.gz' | |
homepage 'http://pychecker.sourceforge.net/' | |
md5 'c37182863dfb09209d6ba4f38fce9d2b' | |
def install | |
system "python", "setup.py", "install", | |
"--prefix=#{prefix}", |
OlderNewer