This file contains hidden or 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
copy contents of /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk from official SDK to /var/sdk on iPhone | |
Install apt from Cydia | |
pushd /var/sdk/usr/lib | |
ln -s libgcc_s.1.dylib libgcc_s.10.5.dylib | |
ln -s dylib1.o dylib1.10.5.o | |
ln -s crt1.o crt1.10.5.o | |
ln -s libstdc++.6.0.9.dylib libstdc++.6.dylib | |
ln -s libstdc++.6.0.9.dylib libstdc++.dylib | |
ln -s libobjc.A.dylib libobjc.dylib | |
ln -s libSystem.B.dylib libSystem.dylib |
This file contains hidden or 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 | |
SDK=`dirname $0` | |
SCRIPT=`basename $0` | |
SDKPARENT=`dirname $SDK` | |
PLATFORM=`uname -sp` | |
if [ "$PLATFORM" = "Darwin i386" -o "$PLATFORM" = "Darwin x86_64" ]; then | |
echo "iPhone Toolchain installer script by rpetrich" | |
echo "" |
This file contains hidden or 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
<? | |
function genRandomString($length) { | |
$characters = '0123456789abcdefghijklmnopqrstuvwxyz'; | |
$string = ''; | |
for ($p = 0; $p < $length; $p++) { | |
$string .= $characters[mt_rand(0, strlen($characters))]; | |
} | |
return $string; | |
} |
This file contains hidden or 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 <UIKit/UIKit.h> | |
#import <ActionMenu/ActionMenu.h> | |
@implementation UIResponder (TestAction) | |
- (BOOL)canDoTestAction:(id)sender | |
{ | |
// Always | |
return YES; | |
} |
This file contains hidden or 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
<? | |
// Twitter self-hosted image service/url shortener by Ryan Petrich | |
// Installation: | |
// 1. Paste this script into the top of your HTTP root's index.php (rename index.html to index.php if it doesn't exist) | |
// 2. Add the following to your HTTP root's .htaccess file (create .htaccess if it doesn't exist): | |
// ErrorDocument 404 /index.php | |
// 3. Create a "s" subfolder and give it 777 permissions | |
// 4. Add the following as the custom URL for URL shortening in Twitter for iPhone's settings: | |
// http://yourdomain.com/?d=%@&p=password | |
// 5. Add the following as the custom URL for Image service: |
This file contains hidden or 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
# shell bookmarks; s <name> to save, l to list and g <name> to go | |
function s { | |
cat ~/.sdirs | grep -v "export DIR_$1=" > ~/.sdirs1 | |
mv ~/.sdirs1 ~/.sdirs | |
echo "export DIR_$1=$PWD" >> ~/.sdirs | |
} | |
function l { | |
source ~/.sdirs | |
env | grep "^DIR_" | cut -c5- | grep "^.*=" | sort | |
} |
This file contains hidden or 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
embedded.mobileprovision |
This file contains hidden or 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
# Change prompt to include battery indicator | |
# Use some funky escapes so bash determines the proper prompt length | |
PS1='\w \[$(~/bin/battery.sh)\] \[\033[1D\] ' |
This file contains hidden or 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 | |
function tabc { | |
NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi | |
osascript -e "tell application \"Terminal\" to set current settings of front window to settings set \"$NAME\"" | |
} | |
function ctrl_c() { | |
tabc "Visor" | |
exit -1 | |
} |
This file contains hidden or 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 | |
ORIGIN=$1 | |
if [ -e $1 ] ; then | |
ORIGIN=origin | |
fi | |
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
PROJECT=`git config --get remote.$ORIGIN.url | cut -f 2- -d : | cut -f 1 -d.` | |
git push $ORIGIN $BRANCH && open "https://github.com/$PROJECT/pull/new/$BRANCH" |
OlderNewer