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 | |
log_error () { | |
echo -e "\x1b[31m$1\x1b[0m" | |
} | |
log_info () { | |
echo -e "\x1b[2m$1\x1b[0m" | |
} |
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
export PATH := node_modules/.bin:$(PATH) | |
export SHELL := /usr/bin/env bash | |
.PHONY: dev | |
dev: check-nvm install # run `yarn dev` in .nvmrc-mandated node | |
@bash -l -c 'nvm exec --silent yarn -s dev' | |
.PHONY: install | |
install: # install deps using yarn in .nvmrc-mandated node | |
@bash -l -c 'nvm exec --silent yarn -s' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<script> | |
(function(Document) { | |
Document.prototype.write = function(s) { | |
var allScripts = document.getElementsByTagName('script'), | |
thisScript = allScripts[allScripts.length-1]; |
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
# This will run `nvm use` everytime you change directory, if | |
# 1. an .nvmrc file is present | |
# 2. there is no .nvmrc but you're not using your default node | |
# Add it to your `.bash_profile` (or wherever else is suitable for your setup). | |
enter_directory(){ | |
if [ "$PWD" != "$PREV_PWD" ]; then | |
PREV_PWD="$PWD"; | |
if [ -e ".nvmrc" ]; then | |
nvm use; |
OlderNewer