Skip to content

Instantly share code, notes, and snippets.

View jmervine's full-sized avatar

Joshua Mervine jmervine

View GitHub Profile
@jmervine
jmervine / gist:6232984
Last active December 21, 2015 02:09
find++
# "Install" (I use that term loosely)
#
# - Paste the function below in your .bashrc / .profile / .zshrc / etc.
#
# Usage: find /usr/local -type [m|g] -name [KEYWORD]
#
# -type m : google maps search
# -type g : google search
#
# all other types pass through to find
#!/usr/bin/env bash
set -x
cd /tmp
rm -rf node
set -ue
git clone git://github.com/joyent/node.git
cd node
@jmervine
jmervine / goinst.sh
Last active July 31, 2016 02:36
Installing GoLang - Ubuntu 12.04.3 LTS \n \l
#!/usr/bin/env bash
#
# Example usage:
#
# $ VERSION=1.3 sudo ./goinst.sh
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@thbar
thbar / README.MD
Created April 18, 2012 09:43
Ruby JSON pipe pretty-printer

A quick ruby command line to pretty-print piped json.

Usage

Put this somewhere in your path, with chmod +x, then:

curl http://myapp.com/stuff.json | json

#!/usr/bin/env roundup
describe "redis-cli(1)"
# Start the redis server on port 9999
port=9999
printf "PORT $port\n" | ./redis-server - &
redis_pid=$!
# Give redis time to start listening
@mbeale
mbeale / gist:4247971
Created December 10, 2012 02:01
Dynamic JSON sample golang #4
type JSONContainer struct {
data []interface{}
}
func (j *JSONContainer) All() (objects []JSONObject) {
for _, v := range j.data {
objects = append(objects, JSONObject{data: v})
}
return
}
@jmervine
jmervine / splunk.sh
Last active March 29, 2021 19:46
Simple script to start and seed a local splunk instances using Docker
#!/usr/bin/env bash
# Simple script to start and seed a local splunk instances using Docker
# Usage:
# $ bash splunk.sh [USERNAME] [HEC TOKEN]
PASSWORD="$1"
TOKEN="$2"
test -z "$PASSWORD" && PASSWORD=password
test -z "$TOKEN" && TOKEN=token
@jmervine
jmervine / general.md
Last active July 21, 2021 23:42
WoW Macros

General Macros and Commands

Commands

Change Cursor Size

Options:

  • -1 is auto
  • 0 is smallest
  • 2 is biggest
/console cursorsizepreferred 2
@wookimiii
wookimiii / grco.bash
Last active September 15, 2021 22:06
Check out a branch using grep
#!/bin/bash
BRANCHES=$(git branch -ra | grep $1)
NUM=$(echo "$BRANCHES" | wc -l)
# check for empty
if [ "X$BRANCHES" = "X" ]
then
echo "No branch matches $1"
fi
@futuremill-ltd
futuremill-ltd / gist:2318876
Created April 6, 2012 11:00
Building Ruby 1.9.3 package for Debian Squeeze
# From a fresh install of squeeze
apt-get install ruby rubygems # Need ruby to use fpm
gem1.8 install fpm --no-ri --no-rdoc
apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -zxvf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125
rm -rf /tmp/ruby193