Skip to content

Instantly share code, notes, and snippets.

View neonichu's full-sized avatar
🤬
GitHub, cancel your contract with ICE!

Boris Bügling neonichu

🤬
GitHub, cancel your contract with ICE!
View GitHub Profile
@neonichu
neonichu / images.sh
Created February 6, 2012 16:30
Quick and dirty script for finding image resources in an Xcode project folder
#!/bin/sh
## Quick and dirty script for finding image resources in an Xcode project folder
for ext in jpg jpeg png
do
matches=`grep -r "\.$ext" *|grep -v '\.xcodeproj'`
IFS=$'\n'
for match in $matches
do
@neonichu
neonichu / last-simulated-app.sh
Created February 28, 2012 15:38
Find the app which ran most recently in the iPhone simulator
#!/bin/sh
## Find the app which ran most recently in the iPhone simulator
SIM_DIR="$HOME/Library/Application Support/iPhone Simulator"
lastapp="`mdfind -onlyin "$SIM_DIR" "kMDItemContentType = \"com.apple.application-bundle\""|head -n 1`"
if [ -z "$1" ]
then
@neonichu
neonichu / dev-cert.sh
Created March 21, 2012 14:18
Extract the subject of the signing certificate of a .mobileprovision file
#!/bin/sh
# Extract the subject of the signing certificate of a .mobileprovision file
if [ -z "$1" ]
then
echo "Usage: $0 [mobileprovision-file]"
exit 1
fi
@neonichu
neonichu / pocketcasts2opml.sh
Created March 31, 2012 17:29
Export OPML from PocketCasts
#!/bin/sh
##
## Generate OPML from your PocketCasts podcast list
##
## You need to retrieve the 'Podcastdb.sqlite' file using iExplorer
## or some similar utility
##
cat <<EOF
@neonichu
neonichu / schnipo.sh
Created April 11, 2012 21:00
Run your schnitzelpress blog from heroku locally
#!/bin/bash
export MONGOLAB_URI="`heroku config|grep ^MONGO|cut -d' ' -f11`"
bundle exec rackup
@neonichu
neonichu / git-xcodeproj-diff.sh
Created January 31, 2013 00:07
Shell script for showing differences between working copy and committed state of Xcode projects. Uses the xcodeproj commandline utitlity from the xcodeproj Gem.
#!/bin/sh
##
# Git diff for Xcode projects
#
# $ sudo gem install xcodeproj
##
if [ -z "$DIFF" ]
then
@neonichu
neonichu / ingress.py
Last active August 28, 2023 18:02
Demo of accessing the Ingress API.
#!/usr/bin/env python
import cookielib
import json
import mechanize
#####
GOOGLE_USER = '[email protected]'
GOOGLE_PASS = 'your-password'
#####
@neonichu
neonichu / dashpod.rb
Created August 7, 2013 19:44
Ruby script which adds documentation for all dependencies from a Podfile to Dash. It's rather hacky and was only tested on Sea Lion, so use at your own risk.
#!/usr/bin/env ruby
require 'rubygems'
require 'cocoapods-core'
require 'json'
require 'mechanize'
require 'rest-client'
docs = JSON.parse(RestClient.get('http://cocoadocs.org/documents.jsonp')[12..-22])
@neonichu
neonichu / .gitignore
Last active December 26, 2015 16:59
"What is the only* public class in the cocoa frameworks that has no methods of its own?" https://twitter.com/NSLondonMeetup/status/394473852094259200
FindClasses
@neonichu
neonichu / mytube.rb
Created January 12, 2014 21:28
This script gets the URL of your frontmost Safari tab, finds the YouTube MP4 URL for it and passes it to your AppleTV. You need to install the rb-appscript and airplay gems first. Tested on OS X 10.9 only.
#!/usr/bin/env ruby
##
## This script gets the URL of your frontmost Safari tab, finds the
## YouTube MP4 URL for it and passes it to your AppleTV.
##
require 'airplay/cli'
require 'appscript'
require 'net/http'