Skip to content

Instantly share code, notes, and snippets.

Stuart Harrison pezholio

Block or report user

Report or block pezholio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View retroarch.cfg
cache_directory = "/tmp/retroarch"
core_options_path = "/opt/retropie/configs/all/retroarch-core-options.cfg"
system_directory = "~/RetroPie/BIOS"
config_save_on_exit = "false"
video_fullscreen_x = "640"
video_fullscreen_y = "480"
video_threaded = "true"
video_smooth = "false"
video_aspect_ratio_auto = "true"
video_font_size = "12.000000"
@pezholio
pezholio / twfy.js
Last active Apr 20, 2017
Getting MP information using TheyWorkForYou
View twfy.js
var Client = require('node-rest-client').Client;
var constituency = 'Tamworth'; // Or the name of the constituency you want information for
var apiKey = ''; // Add your API key here
var uri = 'https://www.theyworkforyou.com/api/getMP?constituency='+ constituency +'&output=json&key='+ apiKey;
var getUri = function(uri, callback) {
var client = new Client();
client.get(uri, function(data, response) {
callback(data);
@pezholio
pezholio / mapit.js
Last active May 11, 2017
Getting parliamentary constituencies from MapIt
View mapit.js
// This assumes you have node-rest-client (https://www.npmjs.com/package/node-rest-client) installed and available in your NODE_PATH
var Client = require('node-rest-client').Client;
var postcode = 'SW1A1AA'; // Or whatever postcode you're looking for
var uri = 'https://mapit.mysociety.org/postcode/' + postcode;
var getConstituency = function(uri, callback) {
var client = new Client();
client.get(uri, function(data, response) {
constituencyCode = data.shortcuts.WMC;
View say-the-swears.sh
curl https://peterkwells.github.io/known-uk-swearwords/data/swearwords.csv | tr -s '\015' '\n' | grep -v UID | cut -d ',' -f 1,2 | sed "s:\(.*\),\(.*\):number \1, \2,:" | say
View gist:6f35ecbf5428018bf7b8eaa2eecfb184
### Keybase proof
I hereby claim:
* I am pezholio on github.
* I am pezholio (https://keybase.io/pezholio) on keybase.
* I have a public key whose fingerprint is BEF5 DA26 5D03 B27B 3090 E8AA 86DF A32C 307A 7922
To claim this, I am signing this object:
View gist:bca94dc1ffd7fd012514
Verifying that +pezholio is my blockchain ID. https://onename.com/pezholio
View Vbox.log
VirtualBox VM 5.0.2 r102096 darwin.amd64 (Aug 13 2015 18:38:03) release log
00:00:00.025706 Log opened 2015-08-18T16:00:27.890079000Z
00:00:00.025708 Build Type: release
00:00:00.025724 OS Product: Darwin
00:00:00.025729 OS Release: 14.4.0
00:00:00.025734 OS Version: Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64
00:00:00.025841 DMI Product Name: MacBookPro9,2
00:00:00.025893 DMI Product Version: 1.0
00:00:00.025901 Host RAM: 8192MB total, 2411MB available
00:00:00.025903 Executable: /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless
View gist:44b042ab703167a9a6d1
require 'test_helper'
class FlowchartsControllerTest < ActionController::TestCase
include Devise::TestHelpers
test "it sets defaults" do
get 'show'
assert assigns(:jurisdiction) == "gb"
assert assigns(:type) == "Practical"
View manifest.json
{
"bot_id": "now-you-was-just-the-kind-of-girl-to-break-my-heart-in-two",
"title": "My simple bot",
"description": "This is a simple bot",
"language": "ruby",
"data_type": "address",
"files": [
"scraper.rb"
],
"frequency": "monthly",
View manifest.json
{
"bot_id": "test-address-bot",
"title": "My simple bot",
"description": "This is a simple bot",
"language": "ruby",
"data_type": "address",
"files": [
"scraper.rb"
],
"frequency": "monthly",
You can’t perform that action at this time.