Skip to content

Instantly share code, notes, and snippets.

View shannonwells's full-sized avatar
🦞
Not being hasty

Shannon Wells shannonwells

🦞
Not being hasty
View GitHub Profile
@shannonwells
shannonwells / 00_bootstrap.sh
Last active February 12, 2022 02:11
Install scripts for use with a USB key, for setting up a new Mac for development.
#!/usr/bin/env bash
PWD=`pwd`
FILES="AllApps casks formulas"
source ./utils.sh
for file in ${FILES} ; do
if [ ! -f ${file} ] ; then
exit_err "${file} is missing. Ensure the following files are all present, then rerun: ${FILES}"
@shannonwells
shannonwells / gup.bash
Last active June 18, 2019 17:20
Go repo helpers
#!/bin/bash
# This is specifically for the go-filecoin repo but a subset of this can apply to any go project with git
# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
set -Euo pipefail
echo "Updating your repo."
echo "☕️ Take a break - this might take a few minutes."
git stash
git co master -q
@shannonwells
shannonwells / uprepo.sh
Last active January 12, 2019 00:11
Script to do all the updating and whatnot to prepare for rebasing or creating a new git branch -- for a Rails project with yarn
#!/bin/bash
THISDIR="dirname ${BASH_SOURCE}"
echo "Updating your repo."
echo "☕️ Take a break - this might take a few minutes."
git co development -q
git pull origin development --ff-only -q
git fetch --prune -q
bundle install --quiet
yarn install -s
@shannonwells
shannonwells / brews.sh
Last active January 12, 2019 00:12
Install script 2: brews.sh - installs all the brew formulas and casks specified in each of 3 files: formulas, casks, fonts.
#!/bin/sh
# Make or touch three files: formulas, casks, and fonts.
# In them, list their respective names of what you want installed.
echo "\033[1;37;45m \033[m"
echo "\033[1;37;45m installing formulas \033[m"
echo "\033[1;37;45m \033[m"
FORMULAS=`cat ./formulas`
@ldez
ldez / gmail-github-filters.md
Last active April 3, 2024 11:53
Gmail and GitHub - Filters

Gmail and GitHub

How to filter emails from GitHub in Gmail and flag them with labels.

The labels in this document are just examples.

Pull Request

Filter Label
@shannonwells
shannonwells / bash_profile
Last active January 12, 2019 00:10
bash profile
cat ~/.bash_profile
export EDITOR=vim
export CLICOLOR=1
export PS1="\[\033[34m\]\h:\W \[\033[35m\]\$(parse_git_branch)\[\033[00m\]\$(git config user.initials)$\[\033[00m\] "
export SUDO_PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;31m\]\$ \[\e[0m\]'
export HISTCONTROL=ignoredups;
shopt -s histappend;
export PROMPT_COMMAND='echo -ne "\033]0;${USER}: ${PWD}\007"'
@vladimirtsyupko
vladimirtsyupko / gist:10964772
Created April 17, 2014 08:32
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master