Skip to content

Instantly share code, notes, and snippets.

🏠
Working from Mars

James Chen ashchan

View GitHub Profile
View gist:fbb5dcc70c48a6434b41154d61217da6
0x00c9fFBAAe8db8343360601E36ab8A306c35182b
View gist:a628dfc9adca733b69aab88d6304557d
0x009518444A4510aC6f48A2A641D1DB02d287F500
View gist:de8c9ac89678c2db24c4658519d05544
0x0046914464b71c9767bFa67A82CB58e2fC19242D
View gist:ee95e178fbdf13ca77ac88d77031baa0
0x00B910Ea17B9ec4594b9fbA0fE7be3ce4db0A90d
@ashchan
ashchan / HairlineView.swift
Last active Aug 29, 2015
Draw a half pixel horizontal line
View HairlineView.swift
import UIKit
// How to use
// Drag an UIView to storyboard, set constraints.
// Set the height constraint priority to less than 1000.
// The view will override that to half pixel.
class HairlineView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
}
@ashchan
ashchan / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ashchan
ashchan / link_nongiest.rake
Last active Dec 15, 2015
Symbolink to digested assets (w/ fingerprint)
View link_nongiest.rake
@ashchan
ashchan / still have problem
Created Jul 20, 2011
macruby_deploy app with space in name
View still have problem
$ macruby_deploy --compile --embed --bs Gmail\ Notifr.app
*** Deployment started
*** Embedding MacRuby.framework
*** Embed BridgeSupport system files
*** Fix install path of binaries
*** Fix identification name of libmacruby
/usr/bin/otool: can't open file: Gmail (No such file or directory)
/usr/bin/otool: can't open file: Notifr.app/Contents/Frameworks/MacRuby.framework/Versions/Current/usr/lib/ruby/site_ruby/1.9.2/universal-darwin10.0/bigdecimal.bundle (No such file or directory)
Error when executing `/usr/bin/otool -L Gmail Notifr.app/Contents/Frameworks/MacRuby.framework/Versions/Current/usr/lib/ruby/site_ruby/1.9.2/universal-darwin10.0/bigdecimal.bundle'
You can’t perform that action at this time.