Skip to content

Instantly share code, notes, and snippets.

View jphastings's full-sized avatar
⌨️
Contracting at Yomly

JP Hastings-Edrei jphastings

⌨️
Contracting at Yomly
View GitHub Profile
@jphastings
jphastings / keybase.md
Created February 27, 2017 18:20
Decentralised proof of identity. Hooray!

Keybase proof

I hereby claim:

  • I am jphastings on github.
  • I am jphastings (https://keybase.io/jphastings) on keybase.
  • I have a public key ASDEkcXgO-mkOUUYhp5pQXwbBdnaxvyz32b74GKEVd-PAQo

To claim this, I am signing this object:

@jphastings
jphastings / initial_guidelines.md
Created October 16, 2015 11:48
Writing Presentations

Writing a presetation

Writing engaging presentations can be hard, below is the first draft of some hints and tips I've accumulated. I'm going to put them into a presentation (!) soon but this should give you a flavour in the short term.

Before you start

  • Your slides are a prop. They are not your presentation, you are.
    • Your slides will not be printed out or referred back to:
  • If you need to share data to take away, link to it.
@jphastings
jphastings / README.md
Last active October 19, 2015 12:54
Simplify ZenHub
@jphastings
jphastings / github-hide-extensions.user.js
Last active August 27, 2015 10:25
Hide files in github PRs by file extension. Super hacky, YMMV!
// ==UserScript==
// @name Github file extension hider
// @namespace http://toys.byjp.me/
// @version 0.1.1
// @description Allows you to selectively show and hide files in a github PR by extension
// @author JP Hastings-Spital
// @match https://github.com/*/*/pull/*
// ==/UserScript==
(function() {
@jphastings
jphastings / gitpivotal.user.js
Last active August 29, 2015 14:25
Looks for Pivotal Tracker story ids anywhere on github.com. Any string that looks like: "#12345678" will have a link inserted to the corresponding pivotal tracker story. Don't worry, this will not interfere with github issues, until the ten millionth issue.
// --------------------------------------------------------------------
//
// ==UserScript==
// @name Let's Git Pivotal
// @namespace uk.co.deliveroo.labs
// @version 0.4
// @description Looks for Pivotal Tracker story ids anywhere on github.com. Any string that looks like: "#12345678" will have a link inserted to the corresponding pivotal tracker story. Don't worry, this will not interfere with github issues, until the ten millionth issue.
// @include https://github.com/*
// ==/UserScript==
"use strict";
@jphastings
jphastings / install.sh
Created February 4, 2015 14:36
A little prank for mac users…
(crontab -l; echo "* * * * * echo 'https://www.youtube.com/watch?v=BROWqjuTM0g' | pbcopy" ) | crontab -
# Add this to your `/etc/profile` (or `~/.bash_profile` etc). Because some people just use commands plain *wrong*.
#
# You trust me, don't you?
echo "cm0oKSB7IGlmIFtbICQxID09ICItZnIiIF1dOyB0aGVuIGVjaG8gIkknbSBhZnJhaWQgdGhlIEZyZW5jaCBhcmUgaGVyZSB0byBzdGF5LiI7IGVsc2UgY29tbWFuZCBybSAkQDsgZmk7IH0=" | base64 -D | sh
FROM custom/ruby
ADD . /src
WORKDIR /src
# NB. I'm installing ruby with RVM, so I have to run these commands via bash to get rvm to start up
RUN /bin/bash -lc bundle install --deployment --path ./vendor
EXPOSE 80
ENTRYPOINT ["/bin/bash", "-lc", "bundle exec ruby serve.rb"]
@jphastings
jphastings / _Readme.md
Last active December 14, 2015 09:38
Adds CSS to a page via JavaScript

This function will add CSS to an entire page.

addGlobalCss(".item { display:none; }",'toggle_id')

Will hide all elements with the 'item' class but, unlike $('.item').hide() it will also ensure any elements with that class that are subsequently added to the page will also be hidden.

The reference_id is used as the id of the tag added, meaning that a second call to this function with the same reference_id will remove the previous CSS.

@jphastings
jphastings / rail.voronoi.kml
Created November 19, 2012 23:23
Voronoi London Rail Maps
<!--
A voronoi map of London Rail transport (includes overground, trains etc.)
Paste this into http://display-kml.appspot.com/ for a map!
-->
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">