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
Show hidden characters
{ | |
"extends": ["tslint-react"], | |
"rules": { | |
"jsx-alignment": false, | |
"jsx-curly-spacing": [true, "never"], | |
"jsx-no-bind": true, | |
"jsx-no-lambda": false, | |
"jsx-no-multiline-js": false, | |
"jsx-wrap-multiline": false, |
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
const flatten = require('flatten') | |
const fs = require('mz/fs') | |
const path = require('path') | |
async function isDirectory(f) { | |
return (await fs.stat(f)).isDirectory() | |
} | |
async function readdir(filePath) { | |
const files = await Promise.all((await fs.readdir(filePath)).map(async f => { |
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
{ | |
"name": "pull-all", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"dependencies": { | |
"co": "^4.6.0", | |
"colors": "^1.1.2", | |
"execa": "^0.5.0", | |
"generic-pool": "^3.1.4", |
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
'use strict' | |
const selfsigned = require('selfsigned') | |
const pems = selfsigned.generate(null, { | |
days: 365 * 10, | |
keySize: 2048, | |
algorithm: 'sha256', | |
}) | |
console.log(pems.private) | |
console.log(pems.public) |
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
#!/bin/bash | |
prompt="$(PS1="$PS1" echo -n | bash --norc -i 2>&1)"; | |
while [ true ]; do | |
echo -n "${prompt%exit}"; | |
read line; | |
echo "-bash: $line: command not found"; | |
done |
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
{ | |
"name": "react-toolbox-sandbox", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"build": "webpack --progress", | |
"buildw": "webpack -w --progress", | |
"buildp": "NODE_ENV=production webpack --progress", | |
"clean": "rm -rf build/" |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
"sort" | |
) | |
// Item is a generic item | |
// type Item interface{} |
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
# | |
# Docker | |
# | |
eval $(docker-machine env default) | |
alias dip="docker-machine ip default" | |
alias d="docker" | |
alias dm="docker-machine" | |
alias dclean="d images; echo ========; d images | grep '<none>' | tr -s ' ' | cut -d ' ' -f 3 | cut -d ':' -f 2 | xargs -n 1 echo docker rmi" |
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 toQueryString(obj, urlEncode) { | |
// | |
// Helper function that flattens an object, retaining key structer as a path array: | |
// | |
// Input: { prop1: 'x', prop2: { y: 1, z: 2 } } | |
// Example output: [ | |
// { path: [ 'prop1' ], val: 'x' }, | |
// { path: [ 'prop2', 'y' ], val: '1' }, | |
// { path: [ 'prop2', 'z' ], val: '2' } | |
// ] |
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
{ | |
"presets": [ "latest", "react" ], | |
"plugins": [ "transform-runtime" ] | |
} |