Note: This file is generated and macro titles are calculated as best as possible with data from input. This is also just a current snapshot, there's no guarantees that all of these macros work. =P
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################# | |
# Function -- Boot2Docker | |
############################################################# | |
if test "$(which boot2docker 2> /dev/null)"; then | |
function docker_shellinit { | |
local _shellinit="$(boot2docker shellinit)" | |
eval "$(echo ${_shellinit})" | |
echo "${_shellinit}" > ~/.boot2dockerrc | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# Usage: | |
# | |
# Download this file and start by running 'make'. Then run | |
# each target listed, 'make lesson_one', 'make lesson_two', | |
# etc. | |
# | |
introduction: | |
# Introduction: |
Note: The method used below is very slow, with 1bb iterations when trying to find 1000. For a faster method see: https://gist.github.com/jmervine/b5d985398b3ca7ba16aa (~125k iterations)
A Pythagorean triplet is a set of three natural numbers, a b c, for which,
a2 + b2 = c2 For example, 32 + 42 = 9 + 16 = 25 = 52.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Joshua P. Mervine <[email protected]> [github.com/jmervine] | |
See: http://jsfiddle.net/jmervine/dqA9r/5/ | |
Use: | |
<script src="http://cdn.mervine.net/FormattedDate.js" /> | |
<script src="http://cdn.mervine.net/FormattedDate.min.js" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias gh="open \`git remote -v | grep [email protected] | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`" |
NewerOlder