Skip to content

Instantly share code, notes, and snippets.

var casper = require('casper').create();
var journeystage = 'ProductPage';
var journeytimings = Array();
casper.on('load.started', function() {
journeytimings[journeystage] = new Date().getTime();
});
casper.on('load.finished', function(status) {
<?php
// Change me
const ADDRESS_ID = 'Gold|StringOfAlphas|MY|HouseNumber'; // Pull from the BT checker with a network inspector :)
const TO_EMAIL = 'me@example.com';
const FROM_EMAIL = 'server@example.com';
// Don't change me
const SERVICE_URL = 'http://www.productsandservices.bt.com/consumerProducts/v1/productAvailability.do';
@iMartyn
iMartyn / keybase.md
Created August 8, 2014 10:51
Keybase proof

Keybase proof

I hereby claim:

  • I am imartyn on github.
  • I am imartyn (https://keybase.io/imartyn) on keybase.
  • I have a public key whose fingerprint is 8EBC 1DF3 822C 1A06 ACA4 AAFF 5EC7 9FA7 3066 3077

To claim this, I am signing this object:

@iMartyn
iMartyn / prank.sh
Last active August 29, 2015 14:08 — forked from glenjamin/prank.sh
function cd() {
# Aliases
alias cd=''
alias exit=''
# Variables
NONE='\033[00m'
RED='\033[01;31m'
SLEEP=`which sleep`
SEQ=`which seq`
wget https://apt.puppetlabs.com/puppetlabs-release-jessie.deb
dpkg -i puppetlabs-release-jessie.deb
apt-get update
apt-get install git puppet hiera vim
git clone https://github.com/iMartyn/degoogle.git
cd degoogle/
git submodule init
git submodule update --recursive
#!/bin/bash
usage() {
echo "Find the true writable size of a device in mb. Useful for cheap/fake"
echo "SD Cards, mp3 players etc. that have been missold."
echo "NOTE: the data on the device WILL be destroyed"
echo ""
echo "Options:"
echo ""
echo " -h|-?|--help Show this help text"
echo " -d /dev/something Destination device"
# Put in your .bashrc :
#Include branch in prompt
__git_ps1 ()
{
local b="$(git symbolic-ref HEAD 2>/dev/null)";
if [ -n "$b" ]; then
printf " (%s)" "${b##refs/heads/}";
fi
}
@iMartyn
iMartyn / commit-msg
Last active January 20, 2021 14:01
Add Jira ref to commit messages
#!/bin/sh
# Uncomment below if you want the commit messages to start [refs: jira-123] or you'll just get [jira-123]
#PREAMBLE="refs: "
SED=sed
# If you're on mac and you don't have gnu sed installed, heaven help you.
if uname | grep "Darwin" 2>&1 > /dev/null; then
SED=gsed
@iMartyn
iMartyn / gist:dc385c99493a2b853f033bf3455b1ac4
Created June 14, 2017 13:51
fluentd config based on tectonic's config
#general
<match fluent.**>
type null
</match>
<source>
@type http
port 9880
bind 0.0.0.0
</source>
<source>
@iMartyn
iMartyn / kubedump.bash
Last active August 14, 2017 17:27
Dump kubernetes cluster into folders containing yaml files
#!/bin/bash
CALLEDFROM=${PWD}
SEARCHFOR='^- apiVersion.*'
OPTIND=1
NAMESPACED=0
while getopts "n" opt; do
case "${opt}" in
n)