Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Eric Nelson sandalsoft

🏠
Working from home
Block or report user

Report or block sandalsoft

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View list_installed_packages.bash
#!/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
View brew file
# 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 Aug 14, 2019
Raspberry Pi bash_profile
View .bash_profile
export PATH=$PATH:~/.local/bin
@sandalsoft
sandalsoft / .bash_prompt
Created Aug 14, 2019
Raspberry Pi prompt
View .bash_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=''
View .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: "
View .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 | .[]'
View .bash_aliases
alias rehash="source ~/.bashrc"
# ------------------------------------
# Docker alias and function
# ------------------------------------
# Get latest container ID
alias dl="docker ps -l -q"
View .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
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
You can’t perform that action at this time.