Skip to content

Instantly share code, notes, and snippets.

View supasympa's full-sized avatar
🎧
💻⌨️🖥 @barclaytweets

Lewis Barclay supasympa

🎧
💻⌨️🖥 @barclaytweets
  • Supa Sympa Ltd
  • London
View GitHub Profile
@jcleveley-zz
jcleveley-zz / gist:4067576
Last active December 11, 2015 10:45
Technical test

Summary

Write a simple JavaScript application that given a number of pennies will calculate the minimum number of Sterling coins needed to make that amount.

Eg. 123p = 1 x £1, 1 x 20p, 1 x 2p, 1 x 1p

You should be prepared to spend at least two hours on it.

Requirements

@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!"

High level style in javascript.

Opinions are like assholes, every one has got one.

This one is mine.

Punctuation: who cares?

Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.

require.extensions[".json"] = function (module, filename) {
module.exports = JSON.parse(require("fs").readFileSync(filename, "utf8"))
}