Skip to content

Instantly share code, notes, and snippets.

View stevecass's full-sized avatar

Steven Cassidy stevecass

  • 01:59 (UTC -05:00)
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-1.11.3.js"></script>
</head>
<body id="body">
<button>Click me and watch the console</button>
<script>
function f() {
@pywebdesign
pywebdesign / config.js
Last active October 22, 2016 21:28
Simple JsonAPi adapter for Restangular
// it require either lodash or underscorejs
.config(function(RestangularProvider) {
// add a response interceptor
RestangularProvider.addResponseInterceptor(function(data, operation, what, url, response, deferred) {
extractedData = data.data;
extractedData.meta = data.meta;
extractedData.included = data.included;
function _apply(elem, fct){
@audibleblink
audibleblink / Resources.md
Last active May 29, 2016 17:47
Resources for Learning iOS
[1]: https://www.udemy.com/swift-learn-apples-new-programming-language-by-examples/
[2]: https://www.udacity.com/course/ud585
[3]: http://www.lynda.com/Swift-tutorials/Swift-Programming-Language-First-Look/182175-2.html
[4]: https://www.bloc.io/swiftris-build-your-first-ios-game-with-swift
[5]: http://www.bignerdranch.com/we-teach/how-to-prepare/ios-device-provisioning.html
[6]: https://parse.com
[7]: http://www.weheartswift.com/swift-programming-scratch-100-exercises/
[8]: https://www.weheartswift.com/object-oriented-programming-swift/
[9]: http://www.learnswift.io/blog/2014/6/12/size-classes-with-xcode-6-and-swift
[10]: http://www.raywenderlich.com/83129/beginning-auto-layout-tutorial-swift-part-1
@audibleblink
audibleblink / newnew.js
Created August 19, 2014 02:54
Reimplementation of the `new` keyword as a function
var newNew = function(constructor, args) {
var instance = Object.create(constructor.prototype)
// instance.__proto__ = constructor.prototype // Same as line above
instance.constructor = constructor // So that you can see who created this.
constructor.apply(instance, args) // Same as #call except args is an arrray with apply
return instance
}