Skip to content

Instantly share code, notes, and snippets.

View rimian's full-sized avatar

Rimian Perkins rimian

View GitHub Profile
@rimian
rimian / pre-commit
Last active October 27, 2022 23:37 — forked from edisonywh/pre-commit
Run Rubocop in Git's pre-commit hook
```
#!/bin/sh
echo "\nRunning Rubocop 🚓 💨 💨 💨\n"
declare -a ERRORS=()
for file in $(git diff --cached --name-only | grep -E '.rb')
do
ERRORS+=("$(rubocop $file | grep -e 'C:' -e 'E:')")
done
@rimian
rimian / gpg-setup.sh
Last active March 1, 2022 23:09
Get set up with Signed Commits on macOS
#!/bin/bash
INFO='\033[1;32m'
NC='\033[0m'
GNUPG_DIR="$HOME/.gnupg"
function info() {
echo -e "${INFO}$1${NC}"
}
@rimian
rimian / ima.md
Created May 24, 2012 12:57 — forked from radar/ima.md

You don't drink beer, oh ok well I didn't know that you just said false things for the fun of it, why would you make multiple references to drinking beer at railscamp if you don't drink any beer? Or do you just put out a different appearance in public than you do in private?