Skip to content

Instantly share code, notes, and snippets.

View ericblue's full-sized avatar

Eric Blue ericblue

View GitHub Profile
@ericblue
ericblue / README.md
Created November 19, 2015 01:54
ithleteHRV

README is empty

@ericblue
ericblue / fix_bash.sh
Last active August 29, 2015 14:06
Bash Shellshock - Compile from source
#!/bin/sh
# Found at http://askubuntu.com/questions/528101/what-is-the-cve-2014-6271-bash-vulnerability-and-how-do-i-fix-it
# From cft over at Hacker News
mkdir src
cd src
wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
#download all patches
for i in $(seq -f "%03g" 0 25); do wget http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-$i; done
@ericblue
ericblue / ngrep_search.sh
Created December 7, 2013 05:16
Ngrep with xargs
#!/bin/sh
# Usage: ngrep_search.sh <search_term>
find . -name 'capfiles*' | xargs -I % ngrep -t -I % -q $1
@ericblue
ericblue / migrate_cvs_git.sh
Last active December 30, 2015 13:39
Migration helper to move from CVS to Git (Using Stash)
#!/bin/sh
# Example: ./migrate_cvs_git.sh /usr/local/cvsroot/dev/api-sandbox sandbox https://[email protected]/scm/proj/repo-sandbox.git
if [ $# -lt 2 ]
then
echo "Usage: $0 <cvs_dir> <git_project_name> <git_origin_url>";
exit 1;
fi
@ericblue
ericblue / sniff_sql.sh
Created November 2, 2012 00:26
Quick n' Dirty SQL tcpdump sniffer and counter
#!/bin/sh
# Author: Eric Blue
# Date: 2012-11-01
#
# Runs Tcpdump, sniffs for SQL traffic and prints out high-level timers and counters for performance tracking
# Idea taken from Poor man's query logging - http://www.mysqlperformanceblog.com/2008/11/07/poor-mans-query-logging/
#
INTERFACE=$1
@ericblue
ericblue / gunzip_pv_file
Created April 9, 2012 23:58
Gunzip and show progress for all .gz files in the current directory
ls -1 *.gz | awk '{print "echo "$1" && pv "$1"|gunzip -c>"$1}' | sed -e 's/.gz//3' | sh