Skip to content

Instantly share code, notes, and snippets.

View mofirouz's full-sized avatar

Mo Firouz mofirouz

View GitHub Profile
@mofirouz
mofirouz / gist:69cc8345fb94e3739106
Last active September 19, 2015 12:07 — forked from adamgit/gist:3705459
Automatically create cross-platform (simulator + device) static libraries for Objective C / iPhone / iPad
##########################################
#
# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4
#
# Version 2.7
#
# Latest Change:
# - Supports iPhone 5 / iPod Touch 5 (uses Apple's workaround to lipo bug)
#
# Purpose:
@mofirouz
mofirouz / battery-icon.applescript
Last active August 17, 2021 12:53
BetterTouchTool Battery Percentage
do shell script "pmset -g batt | grep InternalBattery | column -t"
set x to the result
set state to word 7 of x
set remaining to the word 10 of x
if state is "discharging" then
return 1
else
return 2
end if