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
/* | |
* Utilities for managing popups easily in Apache Cordova | |
* Use like: | |
* | |
* ... | |
* <script src="path/to/cordova.js"></script> | |
* <script src="path/to/this/file/iab.js"></script> | |
* ... | |
* | |
* Also, be sure that the InAppBrowser plugin is |
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
var Q = require('q') | |
Q.while = (conditionCallback, stepCallback) => { | |
var deferredWhile = Q.defer() | |
// | |
// CONDITION | |
// | |
// This is where the condition checking happens: | |
// 1) check the conditional |
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
{ | |
"presets": [ "latest", "react" ], | |
"plugins": [ "transform-runtime" ] | |
} |
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
# | |
# 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
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
{ | |
"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
#!/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
'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
{ | |
"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", |
OlderNewer