Skip to content

Instantly share code, notes, and snippets.


Sabith Pocker sabithpocker

View GitHub Profile
View The Essense of Composition
Implement, as best as you can, the identity function in your favorite language
(or the second favorite, if your favorite language happens to be Haskell).
const identity = x => x;
Implement the composition function in your favorite language.
It takes two functions as arguments and returns a function that is their composition.
sabithpocker /
Created May 7, 2017 — forked from kevincennis/
V8 Installation and d8 shell usage

Installing V8 on a Mac


  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)
  • Install depot_tools
    • git clone
    • sudo nano ~/.bash_profile
    • Add export PATH=/path/to/depot_tools:"$PATH" (it's important that depot_tools comes first here)
sabithpocker /
Created Sep 3, 2012
Connect Outlet Ember 1.0 pre

##Connect Outlet

connectOutlet creates a new instance of a provided view class, wires it up to its associated controller, and assigns the new view to a property on the current controller.

The purpose of this method is to enable views that use outlets to quickly assign new views for a given outlet.

For example, an application view’s template may look like

sabithpocker /
Created Sep 2, 2012
Ember.js action helper and routing.

#Relevent parts to explain action, routes in Ember 1.0pre

##Action Helper The {{action}} helper registers an HTML element within a template for DOM event handling and forwards that interaction to the Application's router, the template's Ember.View instance, or supplied target option (see 'Specifiying a Target'). User interaction with that element will invoke the supplied action name on the appropriate target.

(Example without Router skipped, check helpers/action.js)