Skip to content

Instantly share code, notes, and snippets.

View sandalsoft's full-sized avatar
🏖️
Working from the beach

Eric Nelson sandalsoft

🏖️
Working from the beach
View GitHub Profile
{
"compilerOptions": {
"preserveConstEnums": true,
"strictNullChecks": true,
"sourceMap": true,
"allowJs": true,
"target": "es5",
"outDir": ".build",
"moduleResolution": "node",
"lib": ["es2015"],
#!/bin/bash -l
export DOTFILES_DIR='/Users/Eric/dotfiles'
export IN_PROCESS_FILE='__Gathering_Installed_Packages_____It_takes_a_minute'
# create status file so we know the process is running
touch $DOTFILES_DIR/$IN_PROCESS_FILE
# List npm globally installed packages
/usr/local/bin/npm ls -g --parseable --depth=0 | awk '{gsub(/\/.*\//,"",$1); print}' | sort -u > $DOTFILES_DIR/npm.list.txt
# Requirements:
# homebrew - http://brew.sh/
# brew bundle - https://github.com/Homebrew/homebrew-bundle
# cask - https://caskroom.github.io/ (installed automatically)
# mas-cli - https://github.com/argon/mas
cask_args appdir: '/Applications'
tap 'caskroom/cask'
tap 'caskroom/versions'
tap 'caskroom/fonts'
@sandalsoft
sandalsoft / .bash_profile
Created August 14, 2019 14:52
Raspberry Pi bash_profile
export PATH=$PATH:~/.local/bin
@sandalsoft
sandalsoft / .bash_prompt
Created August 14, 2019 13:20
Raspberry Pi prompt
# @gf3’s Sexy Bash Prompt, inspired by “Extravagant Zsh Prompt”
# Shamelessly copied from https://github.com/gf3/dotfiles
# https://www.tecmint.com/customize-bash-colors-terminal-prompt-linux/
default_username='unknown'
OSNAME="HypriotOS: "
PROMPTCHAR=''
@sandalsoft
sandalsoft / .bash_prompt
Created August 14, 2019 12:56
rpi bash prompt
# @gf3’s Sexy Bash Prompt, inspired by “Extravagant Zsh Prompt”
# Shamelessly copied from https://github.com/gf3/dotfiles
default_username='unknown'
OSNAME="HypriotOS: "
PROMPTCHAR=''
# determine OS type
if [ "$(uname -s)" = Darwin ]; then
OSNAME="OSX: "
@sandalsoft
sandalsoft / .bash_exports
Created August 13, 2019 21:14
pi bash exports
# ------------------------------------
# Exports and aliases
# ------------------------------------
export CONTAINERS_HOME=$HOME/containers
export CONTAINER_HOME=$CONTAINERS_HOME
export JQ_EXPR_UNIQUE_DOCKER_COMPOSE_RELATIVE_PATH_VOLUMES='with_entries(.value |= .volumes) | to_entries | map(.value) | flatten | map (. | try split(":")) | map(.[0] ) | map(. | select(. | startswith("/") | not)) | unique | .[]'
@sandalsoft
sandalsoft / .bash_aliases
Created August 13, 2019 21:14
pi bash alises
alias rehash="source ~/.bashrc"
# ------------------------------------
# Docker alias and function
# ------------------------------------
# Get latest container ID
alias dl="docker ps -l -q"
@sandalsoft
sandalsoft / .bash_functions
Created August 13, 2019 21:13
pi bash functions
function fixssh() {
sed -i '' "$1d" $HOME/.ssh/known_hosts
}
# set container debug port in package.json
function set.container.debug.port () {
echo "Setting container port"
$BIN/container_debug_port_script package.json