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 | |
# @Puppybits circa(2011-05-23) | |
#FIRST install ffmpeg with the proper plugins then add ffmpeg to profile then convert videos | |
# sudo port install ffmpeg +gpl +lame +x264 +xvid +faac | |
# cat ~/.profile echo export #FFMPEG_DATADIR=/opt/local/var/macports/software/ffmpeg/0.6.2_0/opt/local/share/ffmpeg | |
#usage: ./cheeky.sh ./ ./convertions *.mov | |
#dir to start search from |
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
PS1="\[\033[1;31m\]\u\[\033[1;31m\]$ \[\033[0m\]" | |
UIARESULTSPATH="/var/log/iphone" | |
############## MACROS ############## | |
function imagefilehash(){ (sips -g make -g model -g pixelHeight -g pixelWidth $1 | tail -n 4; GetFileInfo -d $1;) | openssl sha1 | sed 's/^(.*)..//g'; } | |
function imagehash(){ openssl sha1 | sed 's/^(.*)..//g'; } | |
alias updateproflie= "pushd ~ && curl -O https://gist.github.com/raw/1142810/a7680ba07bacf8f4a6b2cef262a99312307a76da/.profile.sh" |
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
package lib | |
{ | |
/** | |
* Note: This is not optimized just sample code | |
*/ | |
public Class CrossDomainImageDownloader | |
{ | |
public static function getImage(url:String, callback:Function):void | |
{ | |
//download cross-domain image |
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
// ARC supported. iOS 4.0+ | |
// | |
// ApplicationStyles.h | |
// | |
// Created by Bobby Schultz on 8/11/11. | |
// Updated 8/23/12 - include fonts, new syntax. | |
// Copyright 2011 PB. All rights reserved. | |
// Based on @drawnonward idea from StackOverflow | |
// http://stackoverflow.com/questions/2824187/objective-c-defining-uicolor-constants | |
// |
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
#Example: itest /Volumes/MyApp/src/tests/automation.js MyAppName | |
function itest(){ | |
MOBILE_SAFARI="/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/Applications/MobileSafari.app"; | |
JS_AUTOMATION_SCRIPT=$1; | |
APP_NAME=$2; | |
TEMPLATE_DIR="/Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate"; | |
APP_DIR=$(find ~/Library/Application\ Support/iPhone\ Simulator -iname $APP_NAME.app) | |
if [ !$APP_DIR ] | |
then | |
APP_DIR=$MOBILE_SAFARI; |
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
// | |
// iOS_API+Blocks.h | |
// | |
// Created by Bobby Schultz on 12/1/11. | |
@interface UIAlertView (PBBlocks) | |
+ (id) alertWithTitle:(NSString*)title | |
message:(NSString*)message | |
clickedBlock:(void(^)(NSInteger))buttonIndexClickedBlock |
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
function halfPNGs(){ | |
dir=$1 | |
n=0 | |
while read f | |
do | |
# Image name | |
i=$(basename "$f") | |
if [[ $i == *\@2x\.png ]]; then | |
# Height of image | |
h=$(sips -g pixelHeight $f) |
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 | |
# Examples: | |
# ./image64.sh myImage.png | |
# outputs: data:image/png;base64,xxxxx | |
# ./image64.sh myImage.png -img | |
# outputs: <img src="data:image/png;base64,xxxxx"> | |
filename=$(basename $1) | |
xtype=${filename##*.} | |
append="" |
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 | |
# search for dSYMs for a full or partial UUID from a crash log. | |
# examples: | |
# ls-uuid.sh B533 | |
# ls-uuid.sh B533 /Volumes/ProjectDrive/savedbuilds | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") |
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
_LGREY='\033[01;32m' | |
_RED='\e[1;31m' | |
_USER='\u' | |
_DIR='\W' | |
_B_RED='\033[1;31m' | |
_DEFAULT_COLOR='\033[0m' | |
function parse_git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo "("${ref#refs/heads/}")" | |
} |
OlderNewer