Skip to content

Instantly share code, notes, and snippets.

View nicinabox's full-sized avatar

Nic Haynes nicinabox

View GitHub Profile

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 15:06
React Native common parts
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"
checkForOuterAction: function checkForOuterAction(event) {
+ if (event.defaultPrevented) return
var isOuterAction = !this.containerEl.contains( && !this.targetEl.contains(;
if (isOuterAction) this.props.onOuterAction(event);
nicinabox /
Last active November 13, 2022 18:16
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 January 28, 2023 04:10
This guide covers building a Let's Split v2.

This guide has moved

To improve collaboration this guide is now available on GitHub.

Continue reading

const scale = ([domainMin, domainMax], [rangeMin, rangeMax]) => (val) => {
return ((val - domainMin) / (domainMax - domainMin)) * (rangeMax - rangeMin) + rangeMin