Skip to content

Instantly share code, notes, and snippets.

View pikesley's full-sized avatar
💭
I fly cargo planes full of rubber dogshit out of Hong Kong

pikesley pikesley

💭
I fly cargo planes full of rubber dogshit out of Hong Kong
View GitHub Profile
OH: “Show me your postcode face”
OH: “@Floppy: Went to twitter to see what @pikesley had just OH tweeted. But he hadn’t. THIS HAS NEVER HAPPENED BEFORE.”
OH: “Maybe she’s just better at pretending”
OH: “We have Lego. This is in lieu of self-respect and dignity”
OH: "Sorry
OH: “This is more tweed research than I’ve ever done”
OH: "Ingested truth
OH: “Horribly depressing timeline of fuckery”
OH: “A good pun is its own reword” *punches @mrchrisadams*
OH: "They did a whole set of what sounded like Bon Jovi covers with a Dobro and a human beatboxer"
#!/usr/bin/env ruby
require 'httparty'
class Derp
include HTTParty
base_uri 'swapi.co/api'
def initialize(service, page)
@options = { query: {site: service, page: page} }
<div class='row'>
<div class='col-md-4'>
<div class='thumbnail'>
<div class='embed-responsive embed-responsive-16by9'>
<iframe class='embed-responsive-item'
src='YOUTUBE EMBED URL GOES HERE'
width='560'
height='315'
allowfullscreen>
</iframe>
@pikesley
pikesley / A hack. Such a hack
Last active August 29, 2015 14:13
Generative art with Gource - https://vimeo.com/117098506
The Ruby is terrible but it works, and Gource and ffmpeg can only be understood with the bamboo headphones on
I, [2015-02-13T14:54:44.657162 #259] INFO -- : Started POST "//runs" for 178.62.31.198 at 2015-02-13 14:54:44 +0000
I, [2015-02-13T14:54:44.695706 #259] INFO -- : Processing by RunsController#run as XML
I, [2015-02-13T14:54:44.695870 #259] INFO -- : Parameters: {"bot_name"=>"make-it-stop", "run_id"=>"draft", "run_uid"=>"491", "run_type"=>"draft", "user_api_key"=>"d95542ef0af45a507af73798"}
I, [2015-02-13T14:54:44.734440 #259] INFO -- : Completed 200 OK in 38ms (ActiveRecord: 0.0ms)
I, [2015-02-13T14:54:44.769113 #241] INFO -- : Setting up /data/data/m/make-it-stop
I, [2015-02-13T14:54:44.769858 #241] INFO -- : Setting up /data/output/draft/m/make-it-stop/491
I, [2015-02-13T14:54:44.770261 #241] INFO -- : Setting up /data/downloads/m/make-it-stop/491/d95542ef0af45a507af73798
I, [2015-02-13T14:54:44.770729 #241] INFO -- : Cloning git@github.com:oa-bots/make-it-stop.git into /data/repo/m/make-it-stop
I, [2015-02-13T14:54:46.089082 #241] INFO -- : Creating container
I, [2015-02-13T14:54:46.090309 #241]
@pikesley
pikesley / autostart
Created March 10, 2015 11:53
RasPi kiosk mode
This is /home/pi/.config/lxsession/LXDE-pi/autostart
@~/runbrowser
rewrite ^/about/space$ http://theodi.org/space permanent;
rewrite ^/people$ http://theodi.org/team permanent;
rewrite ^/people/nrs$ http://theodi.org/team/nigel-shadbolt permanent;
rewrite ^/people/gavin$ http://theodi.org/team/gavin-starks permanent;
rewrite ^/people/jeni$ http://theodi.org/team/jeni-tennison permanent;
rewrite ^/team/dr-david-tarrant$ http://theodi.org/team/david-tarrant permanent;
rewrite ^/people/(.*)$ http://theodi.org/team/$1 permanent;
rewrite ^/team/board$ http://theodi.org/team permanent;
rewrite ^/team/executive$ http://theodi.org/team permanent;
rewrite ^/team/commercial$ http://theodi.org/team permanent;
[13:32] Sam: Good writeup of making a gem: http://xnoder.github.io/2015/08/12/rolling-gems/
A code slinging, Linux administering, motorcycle riding cloud engineer in Africa.
[13:34] Stuart Harrison: Woah
[13:34] Stuart Harrison: Wait
[13:34] Stuart Harrison: So `bundle gem` allows you to specify a testing framework
require 'nokogiri'
require 'open-uri'
Nokogiri::HTML(open('http://genius.com/Taylor-swift-bad-blood-lyrics')).xpath("//div[contains(@class,'lyrics')]/p").map { |i| puts i }
@pikesley
pikesley / disinter-body.rb
Created October 23, 2015 16:01
Extract the body from a VCR cassette
require 'yaml'
require 'json'
cassette = 'spec/vcr/Module_Class/some_cassette.yml'
body = (JSON.parse ((YAML.load File.read cassette)['http_interactions'][0]['response']['body']['string']))