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 / issues.py
Created March 30, 2014 16:40
Get a list of issues to act on for the CocoaPods Bug Bash.
#!/usr/bin/env python
from github3 import login, GitHub
gh = login('user', 'password')
repo = gh.repository('CocoaPods', 'CocoaPods')
for issue in repo.iter_issues():
if issue.is_closed():
continue

Keybase proof

I hereby claim:

  • I am neonichu on github.
  • I am neonacho (https://keybase.io/neonacho) on keybase.
  • I have a public key whose fingerprint is B9E8 141C 6924 9896 9911 7D94 AD0B A760 2CAD 97ED

To claim this, I am signing this object:

@neonichu
neonichu / unretinify.sh
Created June 16, 2014 13:48
Create 1x versions of all images in the CWD.
#!/bin/sh
#
# Create 1x versions of all images in the CWD.
#
IFS=$'\n'
for file in `ls *@2x*`
do
new_file=`echo $file|sed 's/@2x//g'`
@neonichu
neonichu / fauxpas2puncover.rb
Last active August 29, 2015 14:06
Convert JSON generated by Faux Pas to a format understood by PuncoverPlugin.
#!/usr/bin/env ruby
require 'rubygems'
require 'date'
require 'json'
input = JSON.parse(ARGF.read)
output = { 'meta' => { 'timestamp' => DateTime.now.strftime('%Y-%m-%d %H:%M:%S.%6N') } }
symbols = {}
@neonichu
neonichu / coverup.rb
Last active August 29, 2015 14:06
Retrieve latest code coverage statistic from coveralls.io
#!/usr/bin/env ruby
require 'json'
require 'net/http'
exit 1 if ARGV.nil? || ARGV.count == 0
project = ARGV[0].gsub(/(http(s)?:\/\/)?(github.com\/)?(.*?)(.git)?/, '\4')
coveralls_uri = URI("https://coveralls.io/r/#{project}.json")
@neonichu
neonichu / fix.rb
Created September 30, 2014 15:39
Fix build settings of Pods.xcodeproj in case of use of legacy build output directory.
#!/usr/bin/env ruby
def build_option(option_name)
output = `xcodebuild -showBuildSettings 2>/dev/null`.split("\n")
output = output.select { |line| line[/#{option_name}/] }
output.map { |line| line.split(' ')[2..-1].join(' ') }
end
require 'xcodeproj'
@neonichu
neonichu / build.sh
Created October 10, 2014 14:47
Installing Ruby 1.9.3 on OS X 10.10
#!/bin/sh
ruby-build -p 1.9.3-p484 /target/path < /path/to/ruby.diff
@neonichu
neonichu / cleaverset.sh
Created November 5, 2014 15:22
Somewhat convert a Deckset presentation for usage with cleaver
#!/bin/sh
if [ ! -f "$1" ]
then
echo "$1: No such file or directory"
exit 1
fi
TMP=`mktemp -t presentation`
@neonichu
neonichu / generics.swift
Created December 29, 2014 20:32
WTF Swift generics?
#!/usr/bin/env xcrun swift
import Foundation
class Base {
}
class Sub : Base {
}
@neonichu
neonichu / array.swift
Created December 30, 2014 21:33
Today's Swift WTF - Arrays
#!/usr/bin/env xcrun swift
func info<T>(x: T) {
println("\(x) is a \(_stdlib_getDemangledTypeName(x))")
}
let array = [0, 1, 2] // appending 'as AnyObject' here yields a compiler error
info(array)