This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
| // Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
| // jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
| // author: Pawel Kozlowski | |
| var myApp = angular.module('myApp', []); | |
| //service style, probably the simplest one | |
| myApp.service('helloWorldFromService', function() { | |
| this.sayHello = function() { | |
| return "Hello, World!" |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
| # coding=UTF-8 | |
| from __future__ import division | |
| import re | |
| # This is a naive text summarization algorithm | |
| # Created by Shlomi Babluki | |
| # April, 2013 | |
| class SummaryTool(object): |
| # | |
| # Working with branches | |
| # | |
| # Get the current branch name (not so useful in itself, but used in | |
| # other aliases) | |
| branch-name = "!git rev-parse --abbrev-ref HEAD" | |
| # Push the current branch to the remote "origin", and set it to track | |
| # the upstream branch | |
| publish = "!git push -u origin $(git branch-name)" |
| generateUniqueID = () -> | |
| _p8 = (s) -> | |
| p = (Math.random().toString(16)+"000000000").substr(2,8) | |
| if s then "-" + p.substr(0,4) + "-" + p.substr(4,4) else p | |
| _p8() + _p8(true) + _p8(true) + _p8() |
| /* ******************************************************************************************* | |
| * THE UPDATED VERSION IS AVAILABLE AT | |
| * https://github.com/LeCoupa/awesome-cheatsheets | |
| * ******************************************************************************************* */ | |
| // 0. Synopsis. | |
| // http://nodejs.org/api/synopsis.html |
| // To the extent possible under law, the Yawning Angel has waived all copyright | |
| // and related or neighboring rights to orhttp_example, using the creative | |
| // commons "cc0" public domain dedication. See LICENSE or | |
| // <http://creativecommons.org/publicdomain/zero/1.0/> for full details. | |
| package main | |
| import ( | |
| // Things needed by the actual interface. | |
| "golang.org/x/net/proxy" |