Skip to content

Instantly share code, notes, and snippets.

View NickCrew's full-sized avatar

Nick Ferguson NickCrew

View GitHub Profile
@NickCrew
NickCrew / rc-bootstrap.sh
Created January 16, 2025 18:56
Bootstrap minimal configs
#!/bin/bash -e
vimrc_url=https://gist.github.com/NickCrew/2aab62f046bc27721ada9a9b1f3724aa
bashrc_url=https://gist.github.com/NickCrew/f61b31f66fe7bc79fd880a03c3177c3f
[[ -f ~/.vimrc ]] && mv ~/.vimrc ~/.vimrc.orig
[[ -f ~/.bashrc ]] && mv ~/.bashrc ~/.bashrc.orig
curl -o ~/.vimrc -L $vimrc_url
curl -o ~/.bashrc -L $bashrc_url
@NickCrew
NickCrew / .vimrc
Created January 16, 2025 18:51
Minimal Vimrc with Sane defaults to carry from host to host
""""""""""""""""""""""""""""""""""""""""""
"
" Minimal Sane Defaults for Classic Vim
"
""""""""""""""""""""""""""""""""""""""""""
set nocompatible
syntax on
filetype on
@NickCrew
NickCrew / minirc.bash
Created January 16, 2025 18:50
Minimal Bashrc - Sane defaults to carry from host to host
#
# A minimal bash configuration to carry around with you
#
# !! Plus some bonus extras like fancy git prompt and bookmarks
#
#
set -o vi # unless you're one of *those*
### Keybase proof
I hereby claim:
* I am nickcrew on github.
* I am nicholascrew (https://keybase.io/nicholascrew) on keybase.
* I have a public key ASA1_n3P69eE3hE2-kqYcspjnwBuWYy-qneI8JcWPQuBwQo
To claim this, I am signing this object:
@NickCrew
NickCrew / check-empty-site-configs.sh
Last active June 19, 2023 00:32
Check For Empty Site Configs
#!/bin/bash -e
ret=0
conf_dir=/etc/nginx/sites-enabled
files=($(find $conf_dir -type f -name "*.conf"))
for cf in "${files[@]}";
do
size=$(ls -alh "${cf}" | awk '{print $5}')
if [[ $size == "0" ]]; then
@NickCrew
NickCrew / .tmux.conf
Created June 5, 2023 19:13
Tmux Config for Servers
# vim: set ft=tmux
set -g prefix C-a
set -g mode-keys vi
set -g mouse on
# set -g default-command zsh
set -g default-terminal "screen-256color"
# tell Tmux that outside terminal supports true color
set -ga terminal-overrides ",xterm-256color*:Tc"
@NickCrew
NickCrew / keybase.md
Created March 8, 2022 22:33
keybase.md

Keybase proof

I hereby claim:

  • I am nickcrew on github.
  • I am nickferguson (https://keybase.io/nickferguson) on keybase.
  • I have a public key ASCOWQdZrPzOGpF5MairHLyWt_eiyjK00Otjz5DVweu7jQo

To claim this, I am signing this object:

@NickCrew
NickCrew / surfingkeys.js
Last active February 11, 2022 21:55
SurfingKeys settings
settings.theme = `
.sk_theme {
font-family: SF Pro;
font-size: 12pt;
background: #393551;
color: #9ccfd8;
}
.sk_theme tbody {
color: #fff;
}
@NickCrew
NickCrew / macos-sane-defaults.sh
Created January 24, 2022 20:29
macOS Sane Defaults
#!/usr/bin/env zsh
#
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Disable Resume system-wide
defaults write NSGlobalDomain NSQuitAlwaysKeepWindows -bool false
@NickCrew
NickCrew / install-dots.sh
Last active January 24, 2022 20:34
Install dotfiles
#!/usr/bin/env zsh
proto=git
[email protected]:
dots_branch=master
if [[ ! -z $1 ]]; then
proto=$1
if [[ $proto == "https" ]]; then
remote_url=https://github.com/