Skip to content

Instantly share code, notes, and snippets.

View ezarko's full-sized avatar

Eric Zarko ezarko

View GitHub Profile
@ezarko
ezarko / gist:d660d9653fae7a746094
Last active March 14, 2022 16:24
Use vimdiff for git diff
# vim
echo "au! BufRead,BufNewFile /tmp/* setlocal buftype=nofile" >> ~/.vimrc
echo "au! BufRead,BufNewFile /proc/* setlocal buftype=nofile" >> ~/.vimrc
echo "syntax on" >> ~/.vimrc
echo "set laststatus=2" >> ~/.vimrc
echo "set statusline=%f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%)" >> ~/.vimrc
# git
git config --global pager.diff ""
git config --global diff.external "/bin/bash -c 'vimdiff -o \"\$1\" \"\$4\"'"
@ryanzhou
ryanzhou / pf.md
Last active October 21, 2019 03:52
Getting Pow to work in OS X Yosemite

Getting Pow to work in OS X Yosemite

Some parts taken from: https://gist.github.com/kujohn/7209628

ipfw is officially deprecated and removed in OS X Yosemite. Pow requires another program pf to handle the port forwarding.

1. Anchor file

Create file /etc/pf.anchors/pow

@lsbardel
lsbardel / redis-server-for-init.d-startup
Created December 15, 2009 21:01 — forked from mtodd/redis-server-for-init.d-startup
Init.d Redis script for Ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db