Skip to content

Instantly share code, notes, and snippets.

View RobbieClarken's full-sized avatar
🦀

Robbie Clarken RobbieClarken

🦀
View GitHub Profile
@RobbieClarken
RobbieClarken / BetfairInObjC.md
Last active December 10, 2015 06:28
Using Betfair SOAP API in Objective C
  • Generate SOAP helper classes for the Global and Exchange WSDLs using SudzC. Be sure to choose the code bundle type that uses ARC.
  • SudzC will generate properties with names beginning with "new" which the compiler will error on. This can be fixed by running the following in the Source directories generated by SudzC:
find . -name "*.h" | xargs -I{} sed -i "" "s/@property (retain, nonatomic) NSString\* new\(.*\);/@property (retain, nonatomic, getter=theNew\1) NSString\* new\1;/" {}
  • Remove the Soap and TouchXML folders from the Exchange bundle created by SudzC to avoid adding duplicate classes.
  • Remove the Source/Generated/Soap+Prefix.h files (they are only used in the SudzC example projects).
  • Add the SudzC Source folders to your Xcode project.
@RobbieClarken
RobbieClarken / ebook.md
Last active July 6, 2020 12:08
Making an ebook from scanned images
  1. Use Scantailor to clean up the scanned images.

  2. Install the required tools with the following commands:

brew install --with-libtiff leptonica
brew install jbig2enc imagemagick tesseract
gem install iconv rmagick hpricot pdfbeads
@RobbieClarken
RobbieClarken / tinyproxy.md
Last active January 10, 2017 10:04
How to use tinyproxy to observe iOS traffic
  • brew install tinyproxy

  • mkdir -p /usr/local/Cellar/tinyproxy/1.8.3/var/{log,run}/tinyproxy

  • Comment out Allow 127.0.0.1 in /usr/local/etc/tinyproxy.conf.

  • Start tinyproxy with tinyproxy -d.

  • Follow the log file with

    tail -f /usr/local/Cellar/tinyproxy/1.8.3/var/log/tinyproxy/tinyproxy.log
brew install libgd
cpan Getopt::Mixed
cpan Image:Size
cpan YAML
cpan -f GD
cpan Image:BMP
  • Install git

    export PATH=/usr/local/sbin:/usr/sbin:/sbin:/bin:$PATH
    sudo apt-get install git vim xclip
  • Add ssh key to GitHub:

    • Generate key:
#!/bin/bash
mkvname=$1
base=$(basename -s .mkv "$mkvname")
outname="$base.remuxed.mkv"
trackinfo=$(mkvinfo -s $mkvname | head -100 | grep Track)
tids=$(echo "$trackinfo" | sed -E "s/Track ([0-9]+).*/\1/")
tracks=$(echo "$tids" | awk '{printf "%s:'$base'.track.%s ", $1, $1}')
trackfiles=$(echo "$tids" | awk '{printf "'$base'.track.%s ", $1}')
durations=$(echo "$trackinfo" \