Skip to content

Instantly share code, notes, and snippets.

View mtvillwock's full-sized avatar

Matthew Villwock mtvillwock

View GitHub Profile
@mtvillwock
mtvillwock / gist:c27f8f8917d698486965
Last active September 3, 2015 03:54 — forked from Mithrandir0x/gist:3639232
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!"
URL list from Tuesday, Jan. 13 2015 23:57 PM
To copy this list, type [Ctrl] A, then type [Ctrl] C.
oop - How is almost everything in Javascript an object? - Stack Overflow
http://stackoverflow.com/questions/9108925/how-is-almost-everything-in-javascript-an-object
javascript - Everything is an object? - Stack Overflow
http://stackoverflow.com/questions/19165021/everything-is-an-object
@mtvillwock
mtvillwock / alias
Last active August 29, 2015 14:13 — forked from jaredsmithse/alias
alias gs='git status'
alias gc='git commit -m'
alias gb='git branch'
alias gaa='git add --all'
alias gco='git checkout'
alias gpom='git push origin master'
alias gplom='git pull --rebase origin master'
alias ga='git add'
alias gd='git diff'
Node = Struct.new(:value, :next)
class LinkedList
def initialize(*values)
@head = Node.new(values.shift, nil)
values.each { |v| add(v) }
end
def add(value)
current = @head