Skip to content

Instantly share code, notes, and snippets.

View luiskhernandez's full-sized avatar

Luis Carlos Hernandez Macias luiskhernandez

View GitHub Profile
@jfgomez86
jfgomez86 / gimme_ip.sh
Created October 12, 2012 14:15
Does this always print your wifi ip address (if you're on a macbook and you're connected to wifi only)?
ifconfig -a | grep inet | tail -1 | xargs ruby -e "puts ARGV[1]"
@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!"