Skip to content

Instantly share code, notes, and snippets.

View stwalkerster's full-sized avatar

Simon Walker stwalkerster

View GitHub Profile
@stwalkerster
stwalkerster / bad.php
Created January 31, 2016 03:55
dependency injection primer
<?php
class PetrolEngine {
public function vroom() {}
}
class Car {
private $engine = new PetrolEngine();
public function goFaster() {
drop procedure if exists mergeToOld;
delimiter $$
create procedure mergeToOld (
in oldid int,
in newid int,
in processUserId int,
in logComment varchar(255)
)
@stwalkerster
stwalkerster / data.sphp
Last active August 29, 2015 14:02
Supercount XML changes
a:12:{s:6:"replag";s:8:"0.000000";s:11:"API Version";s:3:"1.5";s:13:"executiontime";a:2:{s:6:"replag";a:2:{s:5:"total";d:0.01;s:7:"queries";a:1:{i:0;a:3:{s:4:"time";d:0.01;s:5:"query";s:129:"SELECT UNIX_TIMESTAMP() - UNIX_TIMESTAMP(rc_timestamp) as replag FROM recentchanges_userindex ORDER BY rc_timestamp DESC LIMIT 1;";s:6:"result";s:9:"succeeded";}}}s:11:"basic_stats";a:2:{s:7:"queries";a:2:{i:0;a:3:{s:4:"time";d:0.02;s:5:"query";s:76:"SELECT COUNT(*) AS count FROM archive_userindex WHERE (`ar_user` ='851859');";s:6:"result";s:9:"succeeded";}i:1;a:3:{s:4:"time";d:0.11;s:5:"query";s:202:"SELECT rev_timestamp, page_title, page_namespace FROM revision_userindex JOIN page ON page_id = rev_page WHERE (`rev_user` = '851859') AND `rev_timestamp` > 1 ORDER BY rev_timestamp ASC LIMIT 0,2695596;";s:6:"result";s:9:"succeeded";}}s:5:"total";d:0.25;}}s:15:"editcountlimits";a:1:{i:0;d:2695596;}s:14:"monthly_counts";a:102:{s:7:"2006/01";a:2:{s:5:"total";i:5;i:0;i:5;}s:7:"2006/02";a:3:{i:0;i:15;s:5:"total";i:16;i:4;i:1;}s:
// ==UserScript==
// @id iitc-plugin-ingressdualmap-exporter@OllieTerrance
// @name IITC plugin: Ingress Dual Map Exporter
// @category Keys
// @version 0.0.0.1
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @description Exports portals currently in view as a CSV list for use with Ingress Dual Map.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
### Keybase proof
I hereby claim:
* I am stwalkerster on github.
* I am stwalkerster (https://keybase.io/stwalkerster) on keybase.
* I have a public key whose fingerprint is 6EDA 5D87 60CC 091E 3B9F 6508 10DA 657D 9612 BE5C
To claim this, I am signing this object:
#!/bin/bash
cd /root
DATA=`./temphumid 4`
old=$IFS
IFS='
'
val="N"
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Message" company="Simon Walker">
// Simon Walker
// </copyright>
// <summary>
// The message.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace SiteFrameworkMessageComparer

These are the commands for the command blocks needed for each stage of the ticket barrier system, in order. They do require some specific wiring, usually using comparators/repeaters etc (especially for buying tickets/railcards).

I plan on adding wiring diagrams to these at some later point. Question marks indicate values that need to be changed for every set of systems. Relative points for x/z coords are accepted - these are left out entirely.