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
Always have your stuff when you need it with @Dropbox. | |
Sign up for free! http://db.tt/dV2cVTg |
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
##### get home path | |
##### src: http://h3manth.com/content/getting-home-path-and-username-python | |
import os | |
home = os.curdir | |
if 'HOME' in os.environ: | |
home = os.environ['HOME'] | |
elif os.name == 'posix': | |
home = os.path.expanduser("~/") |
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/bash | |
# This hook is run after a new virtualenv is activated. | |
pip install yolk | |
echo "cd "$(pwd) >> $VIRTUAL_ENV/bin/postactivate |
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
//#define VERBOSE | |
/* *************************************************************************** | |
Copyright 2011 Calvin Rien | |
(http://the.darktable.com) | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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 python -tt | |
# -*- encoding: utf-8 -*- | |
# Xcode.py | |
# @author: Bruno Gama | |
# @email: bgamap at gmail.com | |
# @license: ICS | |
import subprocess | |
import shlex | |
import plistlib |
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
ss() { | |
__project=$(find . -iname "*.sublime-project" -d 1) | |
if [ -n "$__project" ]; then | |
echo "Opening ${__project}" | |
open $__project | |
else | |
echo "s $(dirname $0)" | |
subl $(dirname $0) | |
fi | |
unset __project |
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
//# How to get the Class of a Property of a Objective-C Class with Objective-C Runtime Reference. | |
+ (id)getPropertyClass:(objc_property_t)currentProperty | |
{ | |
NSString *currentPropertyAttrs = [NSString stringWithUTF8String:property_getAttributes(currentProperty)]; | |
NSError *error = nil; |
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
wifi="en1" | |
lan="en0" | |
localnet="{ en0 en1 }" | |
set limit { frags 5000, states 2500 } | |
set block-policy drop | |
set skip on lo0 | |
set fingerprints '/etc/pf.os' | |
set ruleset-optimization basic | |
set optimization normal | |
set loginterface pflog0 |
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 bash | |
# Written by William Ting for the following blog post: | |
# http://williamting.com/posts/2012/04/18/set-up-python-and-django-on-dreamhost/ | |
rcfile="${HOME}/.bashrc" | |
version="2.7.3" | |
setuptools_version="2.7" | |
tmp_dir="${HOME}/tmp-${RANDOM}" | |
if [[ ${#} == 0 ]]; then |
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
pip freeze | xargs pip uninstall -y |