View main.go
This file contains 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
package main | |
/* | |
Run via `go run main.go` | |
Test via `curl -i localhost:4000` | |
Load test via https://github.com/rakyll/hey | |
hey -n 500000 -c 50 -q 166 -m GET http://localhost:4000 | |
Summary: |
View server.go
This file contains 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
package main | |
// | |
// Run the server | |
// go run server.go | |
// | |
// Expose via ngrok | |
// ngrok http 8080 | |
// | |
// |
View github_check_branch.sh
This file contains 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 | |
# | |
# Assumes you have run 'github_get_all.sh' to get the latest git repos for your org | |
# | |
# Note:This script will ONLY work reliably if you have run 'github_get_all.sh on an empty | |
# directory, so that all repos are freashly cloned and clean | |
# | |
# Iterate over all the github repos under the cwd, for each reports if | |
# branch1 is behind branch2 | |
# |
View github_get_all.sh
This file contains 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 | |
# | |
# Checkout all repos, or brings branches up to date for an Org | |
# | |
read -d '' helptxt <<- "HELP_MSG" | |
Checkout all repos for a github organisation \\n | |
\\n | |
Usage:\\n | |
\\n |
View schemaspy.sh
This file contains 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 | |
# | |
# - Run dockerised schemaspy against a postgres db | |
# - write the output to a host directory | |
# - Opens the generated website in your broswer | |
# | |
# Assumes you have already got the schemaspy docker image eg: `docker pull schemaspy/schemaspy:snapshot` | |
# | |
set -e |
View unix-socket-to-tcp.sh
This file contains 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 | |
set -e | |
if [ $# -ne 3 ]; then | |
echo "Usage:" | |
echo "" | |
echo " `basename $0` <unix socket file> <host> <listen port>" | |
echo "" | |
echo "For example:" |
View gist:ad5771f568b2e51db95828713f765765
This file contains 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
VAGRANT_LOG=info vagrant init ubuntu/trusty64 | |
INFO global: Vagrant version: 1.8.5 | |
INFO global: Ruby version: 2.2.3 | |
INFO global: RubyGems version: 2.4.5.1 | |
INFO global: VAGRANT_LOG="info" | |
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/gems/vagrant-1.8.5/bin/vagrant" | |
INFO global: VAGRANT_OLD_ENV_VAGRANT_LOG="info" | |
INFO global: VAGRANT_OLD_ENV_TERM="xterm-256color" | |
INFO global: VAGRANT_OLD_ENV_SSH_AUTH_SOCK="/private/tmp/com.apple.launchd.Kfz21yAIM0/Listeners" | |
INFO global: VAGRANT_OLD_ENV_LOGNAME="davidoram" |
View gist:4eff788c3037d0ca358d
This file contains 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
query = Sidekiq::RetrySet.new | |
callbacks = query.select {|j| j.klass == 'CallbackNotificationWorker' } |
View gist:4c9b1d2648e3e3ed5182
This file contains 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
puts " -- > called blah_blah_method" | |
puts caller.select{ |f| f =~ /flybuys/ } |
NewerOlder