Skip to content

Instantly share code, notes, and snippets.

View johnsyweb's full-sized avatar

Pete Johns johnsyweb

View GitHub Profile
@johnsyweb
johnsyweb / cucumber.diff
Created October 10, 2018 21:49
Sample Cucumber Failure...
% git reset --hard origin/master && rbenv version && bundle exec cucumber --version && bundle exec cucumber features/built_in_matchers/all.feature:21
HEAD is now at 00252315 Merge 3-8-maintenance
2.5.1 (set by RBENV_VERSION environment variable)
1.3.20
/opt/rubies/2.5.1/lib/ruby/gems/2.5.0/gems/gherkin-2.12.2/lib/gherkin/formatter/filter_formatter.rb:105: warning: constant ::Fixnum is deprecated
Using the default profile...
..F
(::) failed steps (::)
#include <iostream>
#if WINDOWS
#include <conio.h>
#else
#include <fcntl.h>
#include <termios.h>
@johnsyweb
johnsyweb / keybase.md
Created July 17, 2017 02:20
Suck it Malcolm!

Keybase proof

I hereby claim:

  • I am johnsyweb on github.
  • I am johnsyweb (https://keybase.io/johnsyweb) on keybase.
  • I have a public key ASCrr5299F40kYKt9QVqd-22qgmC4914VfJb57pn7sHojAo

To claim this, I am signing this object:

@johnsyweb
johnsyweb / list_set_slice.py
Created November 11, 2016 23:37
Python surprise!
>>> l = []
>>> l[100:] = ['foo']
>>> l[100]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: list index out of range
for region in $(aws ec2 describe-regions --region ap-southeast-1 --query 'Regions[].RegionName' --output=text); do
echo "EC2 instances in ${region}..."
aws ec2 describe-instances --region ${region} --query 'Reservations[].Instances[].Tags[?Key==`Name`].Value' --output=text
done
Default:Solarized Dark xterm-256color
# Development
ci-public:Ocean
ci:Ocean
skynet:Ocean
skynet-public:Ocean
# Test
gateqa-p11:Grass
@johnsyweb
johnsyweb / robomo.conf
Created July 11, 2013 06:47
Start robomo from upstart
# vim: ft=upstart
description "Robomo"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec su - ci -c 'cd /home/ci/robomo/lib && ruby robomo.rb > /var/log/robomo.log 2>&1'
#!/usr/bin/ruby
#-*-ruby-*-
# A script to run ctags on all .rb files in a project. Can be run on
# the current dir, called from a git callback, or install itself as a
# git post-merge and post-commit callback.
CTAGS = '/opt/local/bin/ctags'
HOOKS = %w{ post-merge post-commit post-checkout }
HOOKS_DIR = '.git/hooks'

It seems AAPL are now using MSFT mail services to deliver "Important" messages.

Received: from CO9EHSNDR001.bigfish.com (mail14-co9on0067.outbound.messaging.microsoft.com [157.56.211.67])
  (using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by beaujolais.extremis.net (Postfix) with ESMTPS id 3b4rGJ5GXPzXCl8
	for <pete@xxxxxx.org>; Tue,  7 May 2013 20:19:04 +0100 (BST)
Received: from co9outboundpool.messaging.microsoft.com (10.236.132.244) by
 CO9EHSNDR001.bigfish.com (10.236.130.55) with Microsoft SMTP Server (TLS) id
@johnsyweb
johnsyweb / mtr --report github.com.md
Last active December 16, 2015 08:48
10% packet loss in rackspace.

From Work [115.146.71.1]

[Fri 13/05/10 08:14 EST][s009][x86_64/darwin12.2.0/12.3.0][5.0.2]
<paj@pajimac:~>
zsh 3013 % mtr --report github.com
HOST: pajimac.local               Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 192.168.0.1                0.0%    10    5.2   4.2   3.3   5.2   0.7
  2.|-- lo-1-pe1-mel-dc2.firenet.  0.0%    10    2.5   3.0   2.3   5.2   0.9
  3.|-- ge-0-0-0-bdr1-mel-dc2.fir  0.0%    10    5.2  10.8   4.4  60.5  17.5