Skip to content

Instantly share code, notes, and snippets.

View vdclouis's full-sized avatar

Louis Van de Calseyde vdclouis

  • @vandecalseyde
  • Ghent
View GitHub Profile
@brandondurham
brandondurham / styles.less
Last active January 11, 2024 06:46
Using Operator Mono in Atom
/**
* Using Operator Mono in Atom
*
* 1. Open up Atom Preferences.
* 2. Click the “Open Config Folder” button.
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up.
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden!
* 5. Tweak away.
*
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png):
@bendc
bendc / fib.js
Created December 15, 2015 17:15
Fibonacci Series
const fib = (n, seq = [0, 1]) =>
n - 2 ? fib(n - 1, [...seq, seq.slice(-2).reduce((a, b) => a + b)]) : seq;
fib(10); // 0, 1, 1, 2, 3, 5, 8, 13, 21, 34
@paullewis
paullewis / requestIdleCallback.js
Last active June 11, 2024 21:10
Shims rIC in case a browser doesn't support it.
/*!
* Copyright 2015 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@klaascuvelier
klaascuvelier / README.md
Last active January 12, 2016 13:01
Collapse diffs for certain file extensions in a PR

Collapse file diffs for files with a certain exentions. The list of extensions is on the end of gist.

@addyosmani
addyosmani / package.json
Last active May 29, 2024 15:54
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@klaascuvelier
klaascuvelier / $q-all-spread.js
Last active August 29, 2015 14:08
Add spread method to $q.all promise
angular
.module('$q-spread', [])
.config(function ($provide) {
$provide.decorator('$q', function ($delegate) {
var originalAll = $delegate.all;
$delegate.all = function (promises) {
var promise = originalAll(promises);
@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!"