Skip to content

Instantly share code, notes, and snippets.

View jeffbcross's full-sized avatar

Jeff Cross jeffbcross

  • Google
  • Mountain View, CA
View GitHub Profile

Tree-shakeable Tokens Docs

Status quo and issues with it

Injector structure

Currently, to provide services in Angular, you include them in an @NgModule:

@Injectable()
@alexlabarces
alexlabarces / deployd.conf
Created February 22, 2014 19:11
NGINX Proxy SSL Configuration for Deployd
# ==================================================
#
# NGINX Proxy SSL Configuration for Deployd
#
# Notes: Be sure to change the following
# 1. example.com
# 2. /path/to/ssl/cert/server.crt
# 3. /path/to/ssl/key/server.key
# 4. Default Deployd port is used (2403)
#
@vojtajina
vojtajina / fetch-git-pr.bash
Created May 8, 2013 04:19
Bash script for fetching a pull request from github...
# fetching a single pull request from github
# put it into ~/.profile or ~/.bashrc
function fetch_pr() {
PR=$1
BRANCH=$2
if [ -z $PR ]; then
echo "Missing pull request number"
return 1
fi
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// 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!"
@ddesilva
ddesilva / ga-tracking-helper.js
Created July 9, 2012 23:24
Require.js Module for the Google Analytics API
define(['require', 'exports'], function(require, exports) {
exports.GATrackingHelper = function(settings) {
// MEMBERS & DEFAULTS
var urchinId = settings.gaqId || false,
devId = settings.devId || 'UA-3172639-5',
page = settings.page || null,
trackingLabel = settings.label || false,
domainName = settings.domainName || '.defencejobs.gov.au',