Skip to content

Instantly share code, notes, and snippets.

Nic Haynes nicinabox

View GitHub Profile
View terminal

screen shot 2018-01-26 at 13 59 43


I can't remember exactly why I started using this over the built in Terminal, but it's very customizable and feature rich.


Originally I switched to zsh to try something different from bash. Now I rely on features like hook functions and syntax highlighting.

function auto_workon() {
if [[ $CURPWD = "$ACTIVE_CURPWD"* ]] && [ -n "${ACTIVE_ENV+1}" ]; then
if [[ -f .venv ]]; then
NEXT_ACTIVE_ENV=`cat .venv`
nicinabox / http.js
Created May 8, 2017
React Native common parts
View http.js
const toJSON = r => r.json()
const checkStatus = (r) => {
if (r.ok) return r
return toJSON(r)
.then((body) => {
let error = new Error(r.statusText)
error.body = body
error.response = r
# Usage: PATH
for path in $1/**; do
dirname=`basename "$path"`
for file in $path/**; do
exiftool -overwrite_original -headline="roll $dirname" "$file"
View react-popover.diff
checkForOuterAction: function checkForOuterAction(event) {
+ if (event.defaultPrevented) return
var isOuterAction = !this.containerEl.contains( && !this.targetEl.contains(;
if (isOuterAction) this.props.onOuterAction(event);
View eeprom-lefthand.eep
nicinabox /
Last active Dec 21, 2019
Find the Pro Micro serial port automatically and flash it
# Usage
# ./ path/to/your.hex
ls /dev/tty* > /tmp/1
echo "Reset your Pro Micro now"
nicinabox / lets split build
Last active May 20, 2019
This guide covers building a Let's Split v2.
View lets split build

This guide has moved

To improve collaboration this guide is now available on GitHub.

Continue reading

View linearScale.js
const scale = ([domainMin, domainMax], [rangeMin, rangeMax]) => (val) => {
return ((val - domainMin) / (domainMax - domainMin)) * (rangeMax - rangeMin) + rangeMin
You can’t perform that action at this time.