Skip to content

Instantly share code, notes, and snippets.

@mxcl
mxcl / install_homebrew.markdown
Created March 6, 2010 15:14
Installs Homebrew to /usr/local so you don't need sudo to `brew install`
@gf3
gf3 / gist:328089
Created March 10, 2010 17:06
iTerm Colours
Black: 0, 0, 0
Red: 229, 34, 34
Green: 166, 227, 45
Yellow: 252, 149, 30
Blue: 196, 141, 255
Magenta: 250, 37, 115
Cyan: 103, 217, 240
White: 242, 242, 242
@tpope
tpope / css.vim
Created January 2, 2011 05:42
Nikolai's fix to nested closing curly brace indenting
" Vim indent file
" Language: CSS
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2010-12-22
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
@blar
blar / gist:856735
Created March 5, 2011 21:25
Get informations via SNMP from Apple TimeCapsule with PHP
<?php
# http://www.opensource.apple.com/source/net_snmp/net_snmp-127/mibs/AIRPORT-BASESTATION-3-MIB.txt
# snmpwalk -v 2c -c public -m AIRPORT-BASESTATION-3-MIB 10.0.1.1 enterprises.apple.airport
$hostname = '10.0.1.1';
$password = 'public';
snmp_read_mib('/usr/share/snmp/mibs/AIRPORT-BASESTATION-3-MIB.txt');
snmp_set_enum_print(true);
@aisipos
aisipos / jsonp-in-flask.py
Created July 20, 2011 01:20 — forked from farazdagi/jsonp-in-flask.py
JSONP in Flask
import json
from functools import wraps
from flask import redirect, request, current_app
def support_jsonp(f):
"""Wraps JSONified output for JSONP"""
@wraps(f)
def decorated_function(*args, **kwargs):
callback = request.args.get('callback', False)
if callback:
@sirupsen
sirupsen / vim7.3_mac_install.rb
Created July 27, 2011 21:57 — forked from pengwynn/vim7.3_mac_install.rb
Script to install Vim 7.3 with ruby support for Mac OS X Lion
# requires root permissions in /usr/bin/
star = String.new
8.times { star += "*" }
Star = "\n#{star * 3}\n"
def newblock string
puts "\n#{Star}#{string}#{Star}\n"
end
@sofish
sofish / autoproxy.js
Created November 5, 2011 04:50
何必加密
/*
* 何必加密,=,=
* 把 decode64() 这个函数的最后一句,“return _3 改成 console.log(_3)”
* 在任何支持 console.log() 的浏览器运行一下,就看出“真正”的源码。
* 何必加密,真是浪费资源
*/
function decode64(_1) {
var _2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var _3 = "";
@atimb
atimb / LICENSE.txt
Created December 8, 2011 23:32 — forked from 140bytes/LICENSE.txt
Snake game in 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Attila Incze <http://atimb.me>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@xream
xream / dnsmasq.conf
Created December 30, 2011 00:47
dnsmasq conf of apple services
#apple
#nslookup -vc a1.phobos.apple.com 168.95.1.1
#203.78.36.42 203.69.138.18
#jp 120.29.145.9 124.40.51.32 61.213.183.25
address=/a1.mzstatic.com/203.69.138.18
address=/a2.mzstatic.com/203.69.138.18
address=/a3.mzstatic.com/203.69.138.18
address=/a4.mzstatic.com/203.69.138.18
address=/a5.mzstatic.com/203.69.138.18
address=/a6.mzstatic.com/203.69.138.18
@sjl
sjl / Menlo-ForPowerline.ttc.zip
Created January 17, 2012 18:09
Patched Menlo for Powerline. This one includes the bold, italic, etc variants.