Skip to content

Instantly share code, notes, and snippets.

View bryanbrady's full-sized avatar

Bryan Brady bryanbrady

  • San Francisco, CA
View GitHub Profile
# In /etc/sysctl.conf
net.ipv4.ip_forward=1
# In /etc/default/ufw:
DEFAULT_FORWARD_POLICY="ACCEPT"
# In /etc/ufw/before.rules, add the following before *filters
*nat
:POSTROUTING ACCEPT [0:0]
#!/usr/bin/env bash
set -e
gdisk /dev/sda <<'EOF'
o
y
n
1
2048
@bryanbrady
bryanbrady / logrotate-bash-history-osx.md
Last active March 20, 2018 18:09
Use logrotate on OSX to backup .bash_history

Backup .bash_history

cp ~/.bash_history ~/.bash_history_backup

Install logrotate

brew install logrotate
@bryanbrady
bryanbrady / brew-up-system.sh
Created December 21, 2017 14:04 — forked from Tehnix/brew-up-system.sh
Set up OS X with brew
#!/bin/sh
binaries=(
trash
git
mosh
tmux
screen
zsh
mackup
pyenv