Skip to content

Instantly share code, notes, and snippets.

View JonathanPorta's full-sized avatar
🎯
Focusing

Jonathan Porta JonathanPorta

🎯
Focusing
View GitHub Profile
@JonathanPorta
JonathanPorta / gist:fb2d07c6a7869e0bba37
Created October 29, 2014 22:59
ES6, Typescript and AtScript
ES6 is JS Next.
Typescript adds compile time static type assertions, and optionally runtime dynamic assertions.
AtScript adds compile time annotations to Typescript.
At(Type(ES6(JS)))
FROM fedora:20
RUN yum install wget make bzip2 --assumeyes
# Download and build chruby
RUN wget -O /tmp/chruby-0.3.8.tar.gz https://github.com/postmodern/chruby/archive/v0.3.8.tar.gz
RUN tar -xzf /tmp/chruby-0.3.8.tar.gz -C /tmp/
RUN /bin/make -C /tmp/chruby-0.3.8/ install
RUN echo 'source /usr/local/share/chruby/chruby.sh' >> $HOME/.bashrc
@JonathanPorta
JonathanPorta / gist:e1adc7962504d3f965a6
Last active August 29, 2015 14:07
Swift Net custom headers usage example
init(hostname: String, accessToken: String) {
self.hostname = hostname
self.request = Net(baseUrlString: self.hostname, headers: ["access_token": accessToken])
}
func getActivities(callback: Callback) -> Void {
self.request.GET("/activities.json", params: nil, successHandler: { responseData in
var json = JSON(data: responseData.data)
callback(json)
}, failureHandler: { error in