Skip to content

Instantly share code, notes, and snippets.

@proger
proger / badge.py
Created February 11, 2013 15:47
run any process with a badge!
#!/usr/bin/env python
import sys
sys.path.insert(0, '/System/Library/PrivateFrameworks/LLDB.framework/Resources/Python')
import lldb
dbg = lldb.SBDebugger.Create()
dbg.SetAsync(False)

ruby-1.9.3-p484 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p484 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@Nurdok
Nurdok / python_conversion.md
Last active June 18, 2025 08:46
Python Conversion

Python Number Conversion Chart

From To Expression
@adamgit
adamgit / .gitignore
Last active July 11, 2026 11:36
.gitignore file for Xcode4 / OS X Source projects
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.6
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
@jelder
jelder / configuration.rb
Created September 7, 2012 18:02
Alternative to Configatron compatible with the 12 Factor App philosophy.
# This is an attempt at constructing an application which complies with the
# ideas expressed at http://www.12factor.net/, specifically section 3, "Config"
# which states that configuration parameters which vary between environments
# should be stored in environment variables.
#
# `Configuration` is a thin wrapper around Ruby's ENV hash which also allows
# traditional custom config parameters to be set. Add an `attr_accessor` line
# and define the value in `config/environments/*.rb`.
#
# For example, `Configuration.api_token` called in the foobar environment will
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@nbrew
nbrew / install_w3af.sh
Created March 1, 2012 23:11
Install w3af with requirements on Mac OS X
#!/bin/bash
# Attempts to install the web application vulnerability scanner w3af and it's prerequisites.
# For more information about w3af, see: http://w3af.sourceforge.net/
# USAGE: pypi_install package_name version_number md5_checksum
# checksum is optional; package and version are required
function pypi_install() {
name=$1
version=$2