Skip to content

Instantly share code, notes, and snippets.

View sabithpocker's full-sized avatar

Sabith Pocker sabithpocker

View GitHub Profile
@sabithpocker
sabithpocker / something.md
Created September 2, 2012 05:26
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)

@sabithpocker
sabithpocker / somethingelse.md
Created September 3, 2012 01:49
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
sabithpocker / v8.md
Created May 7, 2017 21:33 — forked from kevincennis/v8.md
V8 Installation and d8 shell usage

Installing V8 on a Mac

Prerequisites

  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)
  • Install depot_tools
    • git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    • sudo nano ~/.bash_profile
    • Add export PATH=/path/to/depot_tools:"$PATH" (it's important that depot_tools comes first here)
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.