This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
-ms-text-size-adjust: 100%; | |
-webkit-text-size-adjust: 100%; | |
} | |
body { | |
margin: 0; | |
font: 16px/1 sans-serif; | |
-moz-osx-font-smoothing: grayscale; | |
-webkit-font-smoothing: antialiased; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BucketActions.createBucket( | |
initValue | |
); | |
// > bucketID | |
BucketActions.addToBucket( | |
bucketID, | |
value | |
); | |
// > true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function reduce(input, transformator, initialValue = null) { | |
let response = new Map(initialValue); | |
for (kv of input.entries()) { | |
response = transformator((result, [key, value]) => { | |
return result.set(key, value); | |
})(response, kv) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Map } from 'immutable'; | |
const items = Map({ | |
id1: Map({ | |
name: 'Item Name', | |
isActive: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DESTRUCTURING | |
// http://www.2ality.com/2015/01/es6-destructuring.html | |
let obj = { first: 'Jane', last: 'Doe' }; | |
let { first: f, last } = obj; | |
// f = 'Jane'; last = 'Doe' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myFunction() { | |
var senderEmail = "[email protected]"; | |
var threads = GmailApp.search("from:"+senderEmail); | |
for (var i = 0; i < threads.length; i++) { | |
Gmail.Users.Messages.remove('me', threads[i].getId()); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {isNil} from 'ramda'; | |
export function dispatch(...funcs) { | |
return function(...args) { | |
for (let fun of funcs) { | |
let ret = fun(...args); | |
if (!isNil(ret)) return ret; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## within current branch, squashes all commits that are ahead of master down into one | |
## useful if you merged with upstream in the middle of your commits (rebase could get very ugly if this is the case) | |
## commit any working changes on branch "mybranchname", then... | |
git checkout master | |
git checkout -b mybranchname_temp | |
git merge --squash mybranchname | |
git commit -am "Message describing all squashed commits" | |
git branch -m mybranchname mybranchname_unsquashed | |
git branch -m mybranchname |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function composeComponents(component, wrappers = []) { | |
return wrappers.reduce((c, wrapper) => wrapper(c), component); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Link from 'components/link'; | |
import { createStyles } from 'styles/styleSheet'; | |
export function Button({ onClick }) { | |
return ( |