Skip to content

Instantly share code, notes, and snippets.

@bernard-leech
bernard-leech / favoured-object-destructuring-pattern.js
Last active Apr 26, 2019
Favoured Object Destructuring Pattern
View favoured-object-destructuring-pattern.js
const defaultsMain = {
content: {
title: 'defaultTitle',
description: 'defaultDescription'
}
}
const defaultObj = { main: defaultsMain }
const {
main: {
content: { title }
@bernard-leech
bernard-leech / .babelrc.js
Created Mar 31, 2019 — forked from nodkz/.babelrc.js
Babel 7.0 with .babelrc.js
View .babelrc.js
/* eslint-disable prefer-template */
const path = require('path');
const aliases = require('./aliases');
// ///////////////////////////////////////////////////////////////
// ////////////////// PLUGINS ////////////////////////////////
// ///////////////////////////////////////////////////////////////
const commonPlugins = [
@bernard-leech
bernard-leech / 0_reuse_code.js
Created Jun 11, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@bernard-leech
bernard-leech / app.js
Created Feb 27, 2017 — forked from clarle/app.js
Short tutorial on how to use Express and node-mysql
View app.js
// Module dependencies
var express = require('express'),
mysql = require('mysql');
// Application initialization
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
@bernard-leech
bernard-leech / dabblet.css
Last active Sep 14, 2016 — forked from csssecrets/dabblet.css
Pie charts — with SVG
View dabblet.css
/**
* Pie charts — with SVG
*/
.pie {
width: 100px;
height: 100px;
display: inline-block;
margin: 10px;
transform: rotate(-90deg);
@bernard-leech
bernard-leech / dabblet.css
Created Sep 14, 2016 — forked from csssecrets/dabblet.css
Static interpolation via paused animations
View dabblet.css
/**
* Static interpolation via paused animations
* This technique becomes more useful if you need to interpolate more than 1 properties, and/or if you need multiple values in the spectrum
* Currently works in every modern browser except Safari
*/
@keyframes foo {
from { background: red }
to { background: yellowgreen }
}
@bernard-leech
bernard-leech / dabblet.css
Created Sep 11, 2016
Pie charts — with SVG
View dabblet.css
/**
* Pie charts — with SVG
*/
.pie {
width: 100px;
height: 100px;
display: inline-block;
margin: 10px;
transform: rotate(-90deg);
@bernard-leech
bernard-leech / husain.md
Created Jul 29, 2016 — forked from voodootikigod/husain.md
JSConf US 2015 Track A Transcript for Jafar Husain: Async Programming in ES7
View husain.md

All right, everybody! Welcome to my talk. ES2016, the evolution of JavaScript. First a little bit about me. My name is Jafar Husain. I'm a tech lead at Netflix, I work for Falcor, an upcoming open data platform, which we intend to release pretty soon, and I'm also one of Netflix's representatives on TC-39, which is JavaScript's standard's committee. This talk used to be called ES7, the evolution of JavaScript, but something happened a couple of committee meetings ago. We decided to change ES6 to ES2015 and ES7 to ES2016. I want to explain this name change. We as a committee want to start shipping JavaScript every year. Just the way you would ship software in an agile way, we want to add features and ship them

@bernard-leech
bernard-leech / .bash_profile
Created Jul 7, 2016 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
View .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@bernard-leech
bernard-leech / examples.md
Created Apr 19, 2016 — forked from jonschlinkert/examples.md
Three files: examples.md, yaml-cheatsheet.md and yaml-cheatsheet.yml
View examples.md

adapted from this blog

# YAML
name: Jon
# YAML
object: