Skip to content

Instantly share code, notes, and snippets.

🌴
Working from home

Adi Roiban adiroiban

🌴
Working from home
Block or report user

Report or block adiroiban

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Mithrandir0x
Mithrandir0x / gist:3639232
Created Sep 5, 2012
Difference between Service, Factory and Provider in AngularJS
View gist:3639232
// 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!"
@lvh
lvh / client.py
Created Jul 6, 2012
Twisted file upload
View client.py
import random
import StringIO
from zope import interface
from twisted.internet import abstract, defer, reactor
from twisted.web import client, http_headers, iweb
class _FileProducer(object): # pragma: no cover
"""
@vojtajina
vojtajina / e2e-tests.js
Created Feb 15, 2012
Angular: Scenario runner explanation
View e2e-tests.js
// simple dsl just wrapping angular's dsl, just providing higher abstraction
angular.scenario.dsl('submitMessage', function() {
return function(message) {
// these dsl already register futures (add fn into the queue),
// so you don't wrap them into addFutureAction
input('modelValue').enter(message);
element('button.submit').click();
};
});
@rubic
rubic / salt-minion.conf
Created Jan 15, 2012
Upstart configuration file for salt-minion
View salt-minion.conf
# salt-minion.conf
description "salt-minion upstart daemon"
author "Jeff Bauer <jbauer@rubic.com>"
# copy this file to /etc/init
start on (net-device-up and local-filesystems)
stop on shutdown
expect fork
You can’t perform that action at this time.