Skip to content

Instantly share code, notes, and snippets.

View jeffsharpe's full-sized avatar

Jeff Sharpe jeffsharpe

  • Vancouver, BC, CA
View GitHub Profile
@jeffsharpe
jeffsharpe / .bash_aliases
Last active December 15, 2015 14:58
My bash aliases, called with `source ~/.bash_aliases` - 20150605
alias annotate='annotate -p before -i -m'
alias aspell="aspell --lang=en_CA"
alias aurget="aurget --deps --noedit"
alias chown='chown --preserve-root'
alias chmod='chmod --preserve-root'
alias chgrp='chgrp --preserve-root'
alias cp="cp -i -v -u"
alias cpuinfo='lscpu'
alias df="df -h"
alias diff="colordiff"
@jeffsharpe
jeffsharpe / .gitconfig
Last active December 15, 2015 14:58
Excert from .gitconfig, aliases I use for git.
[alias]
br = branch
co = checkout
ct = commit
cam = commit -a -m
dc = diff --color
fix = commit --amend -C HEAD
head = !"git log -n1"
ignore = !([ ! -e .gitignore ] && touch .gitignore) | echo $1 >>.gitignore
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
/*
Copyright (C) 2011 Colin Faulkingham, http://3a2d29.com/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
#
# ~/.bash_prompt
#
#Prompt and prompt colors
# 30m - Black
# 31m - Red
# 32m - Green
# 33m - Yellow
# 34m - Blue
@jeffsharpe
jeffsharpe / gist:8828837
Created February 5, 2014 17:21
OS Detection in .gvimrc
if has('macunix')
set guifont=Monaco:h13
set fuoptions=maxvert,maxhorz
elseif has('unix')
set guifont=Inconsolata\ Medium\ 12
endif
@jeffsharpe
jeffsharpe / update-arch-packages.sh
Last active August 29, 2015 13:56
update-arch-packages.sh
#!/usr/bin/env bash
if [ -x "/usr/bin/reflector" ]; then
DATE=`date +%Y%m%d`
sudo cp -f /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.${DATE}
sudo reflector --sort rate --protocol http --fastest 5 --age 36 --save /etc/pacman.d/mirrorlist
fi
sudo pacman -Syyu
@jeffsharpe
jeffsharpe / arch-post-install.sh
Last active February 8, 2023 21:19
Post Installation Arch Linux Notes - 20150919
#
# post installation
#
# login as ‘root’ and with the password set above
# connect if using wifi - eth should just work
nmcli dev wifi list
nmcli dev wifi connect “Hearth 5GHz" password [somepasswordhere]
# if it fails, try it again - it often fails for me on the 1st attempt (not sure why)
ping -c 3 www.google.ca
@jeffsharpe
jeffsharpe / .vimrc
Last active August 29, 2015 14:05
vimrc - 20150605
""
""
"" Mappings / Keybindings
""
"" leader is ','
""
"" Manipulate $MYVIMRC
"" Use <leader>ev to edit .vimrc
"" Use <leader>sv to reload .vimrc
""
@jeffsharpe
jeffsharpe / .bash_prompt
Last active July 7, 2017 19:47
My ~/.bash_prompt script. 20170707
#
# ~/.bash_prompt
#
# Call this file from ~/.bashrc or ~/.bash_profile with
# source ~/.bash_prompt#
#
# Required Bash version 4.x or above
# Works on OSX, Linux and Cygwin
# Prints the git branch (if any)
@jeffsharpe
jeffsharpe / arch-luks-on-lvm.sh
Last active August 29, 2015 14:07
arch-luks-on-lvm.sh
#
# Using LUKS on LVM is different than LVM on LUKS
#
# idea is to create the root encrypted system, then use a password file to mount the others
# so for the initial install, do this instead of the above
#
# load this module
modprobe dm-mod
#
pvcreate /dev/sda3