This file contains 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 ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" | |
"strconv" |
This file contains 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 | |
set -e | |
function ynprompt { | |
read -n 1 -r -p "KEEP GOING? [Y/n] " response | |
if [[ $response =~ ^([nN])$ ]] | |
then | |
exit | |
fi |
This file contains 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
** Typical Redux ** | |
dispatch({type: 'SET_DONUT', flavor: 'jelly'}) | |
reduce(state, action) { | |
... | |
case SET_DONUT: | |
return { ...state, flavor: jelly }; | |
} |
This file contains 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
/** | |
* @constructor | |
*/ | |
chartbeat.widgets.IDragger = function(target, handle, limits) { | |
goog.fx.Dragger.call(this, target, handle, limits); | |
if (goog.userAgent.MOBILE) { | |
target.addEventListener('touchstart', goog.bind(this.startDragTouch, this)); | |
} | |
}; | |
goog.inherits(chartbeat.widgets.IDragger, goog.fx.Dragger); |