- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
text-shadow: 1px 4px 2px rgba(0, 0, 0, 0.16); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
tree: { | |
value1: 234, | |
valueOptions: { | |
subOption1: 123, | |
subOption2: 133, | |
subOption3: 7432, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
classNames: ['apps-page'], | |
sortProperty: ['name'], | |
sortedApps: Ember.computed.sort('apps', 'sortProperty'), | |
actions: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
actions: { | |
transition: function() { | |
this.transitionToRoute('newroute', {id: 1, model: 123}); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var results = [NSDictionary]() | |
if let path = NSBundle.mainBundle().pathForResource("output", ofType: "json") { | |
do { | |
let jsonData = try NSData(contentsOfFile: path, options: NSDataReadingOptions.DataReadingMappedIfSafe) | |
do { | |
let jsonResult: NSDictionary = try NSJSONSerialization.JSONObjectWithData(jsonData, options: NSJSONReadingOptions.MutableContainers) as! NSDictionary | |
if let londonEvents = jsonResult["WALES"] as? [[String: AnyObject]] { | |
I hereby claim:
- I am joeltrew on github.
- I am minispecs (https://keybase.io/minispecs) on keybase.
- I have a public key ASDjr5A5QRd8qkOKdW1xQ1FkcFwuR2d9dVyQH9hSU3Jw4Qo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIColor { | |
convenience init(hex: StaticString) { | |
let hex = String(hex.description) | |
guard let rgb = UIColor.rgbValue(from: hex) else { | |
preconditionFailure("Invalid hex color string provided") | |
} | |
self.init( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public extension Publisher where Failure == Never { | |
func sinkResult<U, E>( | |
receiveSuccess: @escaping ((U) -> Void), | |
receiveFailure: @escaping ((E) -> Void) | |
) -> AnyCancellable where Output == Result<U, E> { | |
let subscriber = Subscribers.Sink<Output, Failure>( | |
receiveCompletion: { _ in }, | |
receiveValue: { result in | |
switch result { | |
case .success(let value): |
OlderNewer