Scripts and dotfiles for working on various Linux systems (based on
Much TODO to be had around here.
Why "-dots"? See the system I start with:
curl sharpsaw.org/init | sh
,M⇒ Configure & make install, passing $DOT&CONFIGURE&ARGS to ./configure, and using $MAKE&INSTALL&SU prepended to the 'make install' command.
,colortest⇒ Print 8- and 256-color tables.
cd /usr/src/linux && sudo make menuconfig && ,kernel-install "$@"
,i⇒ Package install using emerge or aptitude, whichever's available.
sudo /etc/init.d/$1 start
,kernel-install⇒ Perform some steps to install a kernel. Set DRIVE=… to override default of /dev/sda, SUDO='' to override sudo, and MAKEFLAGS=… to override -j5.
,ls⇒ List the files belonging to a given package
,s⇒ Package search using eix or aptitude, whichever's present.
,var-log⇒ Tail -f all non-binary, non-"old" log files in /var/log
,xsession-errors⇒ A simple tail on ~/.xsession-errors. Will probably add grep -v's to filter.
sudo aptitude update; sudo aptitude dist-upgrade "$@"
apti⇒ Use aptitude or apt-get to install a package.
apts⇒ Use aptitude or apt-cache to search for a package.
aptitude show "$@"
sudo aptitude update "$@"
sudo aptitude update; sudo aptitude install "$@"
autounmask-write⇒ Runs an
emergewhen mask failures. Good as
sudo useradd -m -G hax0rs $1
cat-p⇒ Swipe stdout from another program by pid (using strace -p)
xsel -b "$@"
fack⇒ find -iname + ack -ila
find . -iname "*$1*"
[ ! -s "$1" ] || (echo "File not empty, not deleting."; exit 37)
ssh-port-forward⇒ Just a handy script, because I find this invocation confusing. Don't forget -v.
There are some useful bits still over at: http://github.com/sharpsaw/local-dots
(Though, actually, I plan on merging that into here, somehow.)
From the vim-eunuch README.md:
:Unlink— Delete a buffer and the file on disk simultaneously.
:Unlink, but doesn't require a neckbeard.
:Rename— Rename a buffer and the file on disk simultaneously.
:Find— Run find and load the results into the quickfix list.
:Locate— Run locate and load the results into the quickfix list.
:SudoWrite— Write a privileged file with sudo.
:W— Write every open window. Handy for kicking off tools like guard.
Ask/tell/demand anything. I'll be receptive.