Skip to content

Instantly share code, notes, and snippets.


Ferdi ferdiemmen

View GitHub Profile
ferdiemmen /
Created Jun 13, 2018 — forked from stephenparish/
Update submodules in a git repository to the latest, but exclude one..
git submodule foreach '[ "$path" == "submodule-to-exclude" ] || git pull origin master'
View gist:2adf128ce23252abfc25e958541ace9e
i solved the same issue recently for this module and others like --> ngx translate and more...
solution (compile the js files into es2015):
npm i --save -dev babel-cli babel-preset-es2015
add this to the root project under the name .babelrc
{ "presets": ["es2015"] }
add a npm script in package.json in "scrtipsts" scope
View gist:fe8ca10edcc73cd493bef5f558a9cfdf
let cookies = {};
document.cookie.split(' ').map(x => x.replace(/;$/g, '').split('=')).map(x => { cookies[x[0]] = x[1]; return x; });
View gist:7c52915195b54419fb8e690fed8fe554
npm version patch -m 'version(package): update to %s'
git push
ferdiemmen / gist:bb61e424b5f78166d1a463f7b7c3683b
Created Dec 19, 2017
Regex which covers all possible e-mail addresses according to the RFC spec
View gist:bb61e424b5f78166d1a463f7b7c3683b
View gist:4da598b46e2b934972b257cac39c5a13
## Deconstruction array items
const myArray = ['apple', 'nut', 'mies'];
const [apple] = myArray;
ferdiemmen / gist:54a12e92ac328d40ceee20e8067cab44
Created Dec 6, 2017
Json stringify ignores keys whose values are undefined
View gist:54a12e92ac328d40ceee20e8067cab44
var breakfast = {
"cereal" : "fruit loops",
"pastry" : undefined
// -> { cereal: 'fruit loops', pastry: undefined }
// -> {"cereal":"fruit loops"}
View gist:e51bef703f34bb92a8a2dd720b2a4b6c
// ================== FIXED GRID OVERLAY ================== //
// Some calculated settings from the Foundation settings file
$base_image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DgAwAEUgFNvg2eQgAAAABJRU5ErkJggg==');
$width: $global-width - rem-calc(map-get($grid-column-gutter, medium));
$offset: rem-calc(map-get($grid-column-gutter, medium));
$gutter: rem-calc(map-get($grid-column-gutter, medium));
$columns: $grid-column-count;
@mixin fixedGridOverlay($width, $columns, $gutter) {
View gist:c7e5e023155801bd3eae736697d689bf
const id = 42;
const myArray = [
id: 1,
name: 'foobar',
id: 7,
name: 'lucky',
You can’t perform that action at this time.