Skip to content

Instantly share code, notes, and snippets.

@DarthNerdus
DarthNerdus / tmux-mem-cpu-load.sh
Last active December 15, 2015 18:29
tmux-mem-cpu-load; usable with Linux or 10.8+ #shell #tmux
#!/bin/bash
if [ -z $1 ]; then
echo "Usage: $0 interval [number of lines]"
exit 1
else
INTERVAL=$1
fi
NUM_LINES=10
@DarthNerdus
DarthNerdus / mosh-cygwin
Created April 13, 2012 01:18 — forked from eerohele/mosh-cygwin.md
Compiling Mosh (http://mosh.mit.edu/) under Cygwin
1. Download Cygwin: http://www.cygwin.com
2. Run setup.exe and install the following packages in addition to the default ones:
- make
- boost
- libncurses-devel
- pkg-config
- perl
3. Download and compile Protocol Buffers: http://code.google.com/p/protobuf/
@DarthNerdus
DarthNerdus / ._what.md
Created April 30, 2010 22:12 — forked from kneath/._what.md
Badass git pull alternative

Badass git pull alternative

Add this little snippet to your ~/.gitconfig and it amps up your git pull by means of git up

  1. Adds in a list of the commits you're pulling down
  2. Auto-prunes remote branches
  3. Defaults to pull --rebase - gets rid of unnecessary merge commits. If you don't know what rebase does, this is probably safe for you. If you know what rebase does, you should know where this will not be safe for you.

Scott Chacon and Ryan Tomayko basically figured out how to do this and I am stealing all of the credit.

@DarthNerdus
DarthNerdus / convert.sh
Created March 18, 2010 22:30
Converts a folder containing a hg-git clone to an pure git clone.
# Convert.sh - Converts a folder containing a hg-git clone to an pure git clone.
function convert() {
local path
for path in "$@"; do
gitpath="$(/bin/cat $path/.hg/hgrc 2>/dev/null | /usr/bin/grep -o "git://.*")"
if [ x$gitpath != x ]
then
rm $path
/usr/local/bin/git clone $gitpath