Skip to content

Instantly share code, notes, and snippets.

[
{
"caption": "Reg Replace: Format VTT",
"command": "reg_replace",
"args": {"replacements": ["remove_timestamps", "remove_numbered_lines","remove_empty_lines","remove_line_endings","remove_WEBVTT_literal","remove_v_tags"]
}
},
]
@ShaneIsley
ShaneIsley / ios-urlschemes-search.sh
Created October 15, 2013 22:32
Search local iTunes IOS apps for URL Scheme info. Append [].CFBundleURLSchemes to .CFBundleURLTypes for just the Schemes. Requires jq & plutil for munging the plist file: brew install jq plutil either comes with OSX, Xcode, or just the Command Line Developer Tools https://developer.apple.com/downloads/index.action
foreach i (~/Music/iTunes/iTunes*/Mobile*/*.ipa) echo $i; unzip -Cnqj $i "Payload/*/Info.plist" && plutil -convert json Info.plist -o Info.json; jq '.CFBundleURLTypes' Info.json 2>/dev/null; rm -rf Info.{plist,json}; end
find . | perl -ne'chomp; next unless -e; $oldname = $_; s/^.+\s+0/0/; next if -e; rename $oldname, $_'
@ShaneIsley
ShaneIsley / gist:965891
Created May 11, 2011 03:48
urwid & mitmproxy install on OSX http://pastebin.com/rAd9Bt7E
$ workon pen
$ git clone git://github.com/wardi/urwid.git
$ cd urwid
$ gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c source/str_util.c -o build/temp.macosx-10.6-universal-2.6/source/str_util.o
$ python setup.py build
$ python setup.py install
for i in ./A\ B\ C*; do zip -r ~/Desktop/"$i.zip" "$i"; done
@ShaneIsley
ShaneIsley / csv convert with text
Created December 7, 2010 22:35
ause Excel to store data specifically as text
Something I discovered way back when...
export data in the following pattern:
="Need to know",="0123456",="0101010"
The combination of the = and the " " cause Excel to store data specifically as text.
[
['00-00-00', 'XEROX CORPORATION'],
['00-00-01', 'XEROX CORPORATION'],
['00-00-02', 'XEROX CORPORATION'],
['00-00-03', 'XEROX CORPORATION'],
['00-00-04', 'XEROX CORPORATION'],
['00-00-05', 'XEROX CORPORATION'],
['00-00-06', 'XEROX CORPORATION'],
['00-00-07', 'XEROX CORPORATION'],
['00-00-08', 'XEROX CORPORATION'],