Skip to content

Instantly share code, notes, and snippets.

View joshrobb's full-sized avatar

Josh Robb joshrobb

  • Auckland, New Zealand
View GitHub Profile
Southern Succor Rub
1/4 cup ground black pepper
1/4 cup paprika
1/4 cup Turbinado sugar 2 Tablespoons table salt
2 teaspoons dry mustard
1 teaspoon cayenne pepper
Smoking wood
Southern Sop
@joshrobb
joshrobb / iis-parse.config
Last active January 8, 2017 12:36
logstash config for parsing IIS maximal logging
#tested using http://grokdebug.herokuapp.com/
input {
tcp {
type => "iis"
port => 3333
}
}
filter {
@joshrobb
joshrobb / git-log-to-tsv.sh
Created May 14, 2016 02:05 — forked from pwenzel/git-log-to-tsv.sh
Git Log to Tab-Delimited CSV File
# Local Dates:
git log --date=local --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.local.tsv.txt
# ISO Dates:
git log --date=iso --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.iso.tsv.txt
@joshrobb
joshrobb / teamcity-build-test-queries.sql
Created March 27, 2016 01:49
Try to figure out how many tests Team city thinks ran between two dates.
--for a given build id - what time was it added/removed from the queue (in UTC + 13)
select *,dateadd(ms, queued_time%(3600*24*1000), dateadd(day, queued_time/(3600*24*1000), '1970-01-01 13:00')), dateadd(ms, remove_from_queue_time%(3600*24*1000), dateadd(day, remove_from_queue_time/(3600*24*1000), '1970-01-01 13:00'))
from build_state b inner join stats s on b.build_id = s.build_id
where dateadd(ms, queued_time%(3600*24*1000), dateadd(day, queued_time/(3600*24*1000), '1970-01-01 13:00')) <= '2016-03-25'
and dateadd(ms, queued_time%(3600*24*1000), dateadd(day, queued_time/(3600*24*1000), '1970-01-01 13:00')) > '2016-03-24'
select sum(test_count), min( dateadd(ms, queued_time%(3600*24*1000), dateadd(day, queued_time/(3600*24*1000), '1970-01-01 13:00'))), max( dateadd(ms, queued_time%(3600*24*1000), dateadd(day, queued_time/(3600*24*1000), '1970-01-01 13:00')))
from build_state b inner join stats s on b.build_id = s.build_id
where dateadd(ms, queued_time%(3600*24*1000), dateadd(day, queued_time/(3600*24*100
@joshrobb
joshrobb / passwd.js
Last active January 19, 2016 23:32
Password validation by hashing difficulty
String.prototype.hackability = function() {
var toppasswords = /password|123456|12345678|1234|qwerty|12345|dragon|pussy|baseball|football|letmein|monkey|696969|abc123|mustang|michael|shadow|master|jennifer|111111|2000|jordan|superman|harley|1234567|fuckme|hunter|fuckyou|trustno1|ranger|buster|thomas|tigger|robert|soccer|fuck|batman|test|pass|killer|hockey|george|charlie|andrew|michelle|love|sunshine|jessica|asshole|6969|pepper|daniel|access|123456789|654321|joshua|maggie|starwars|silver|william|dallas|yankees|123123|ashley|666666|hello|amanda|orange|biteme|freedom|computer|sexy|thunder|nicole|ginger|heather|hammer|summer|corvette|taylor|fucker|austin|1111|merlin|matthew|121212|golfer|cheese|princess|martin|chelsea|patrick|richard|diamond|yellow|bigdog|secret|asdfgh|sparky|cowboy|camaro|anthony|matrix|falcon|iloveyou|bailey|guitar|jackson|purple|scooter|phoenix|aaaaaa|morgan|tigers|porsche|mickey|maverick|cookie|nascar|peanut|justin|131313|money|horny|samantha|panties|steelers|joseph|snoopy|boomer|whatever|
@joshrobb
joshrobb / hipchatEmoticon.user.js
Last active December 25, 2015 20:39
Autocomplete user script for Hipchat - drop this file into an open Chrome extensions window and it will enable autocomplete for hipchat emoticons.
// ==UserScript==
// @name HipchatEmotiAutocomplete
// @description Autocomplete for emoticons in hipchat
// @include https://*.hipchat.com/chat*
// @version 1.0
// ==/UserScript==
var code = function() {
window.emoti_autocomplete = {
input: null,
@joshrobb
joshrobb / gist:4223815
Created December 6, 2012 11:25 — forked from bradwilson/gist:4215933
.gitconfig
[user]
name = Brad Wilson
email = dotnetguy@gmail.com
[alias]
amend = commit --amend
bl = blame -w -M -C
br = branch
cat = cat-file -t
co = checkout
df = diff --word-diff
@joshrobb
joshrobb / gist:3857792
Created October 9, 2012 10:14 — forked from thehunmonkgroup/node-app
Redhat init script for managing a NodeJS app via forever
#!/bin/sh
##
## Redhat / Linux / LSB
##
# chkconfig: 345 85 15
# description: Startup script for Express / Node.js application with the \
## forever module.
##
## A modification of https://gist.github.com/1339289
##
@joshrobb
joshrobb / example_stack.js
Created May 26, 2012 10:23 — forked from tritonrc/example_stack.js
Example Dreadnot stack with Rails 3.2 and Heroku
var async = require('async')
var git = require('util/git')
var misc = require('util/misc')
exports.get_deployedRevision = function(args, callback) {
git.revParse(this.config.program_creator_dir, 'HEAD', function(err, stdout) {
callback(null, stdout.replace(/^\s+|\s+$/g, ''))
})
}
$snapins = Get-PSSnapin -Registered
$snapins | Add-PSSnapin
Get-Module -ListAvailable | Import-Module
Get-PSSnapin | Format-Table -autosize PSVersion, Name
Get-Module | Format-Table -autosize ModuleType, Name
function ff ([string] $glob) { get-childitem -recurse -include $glob }