Skip to content

Instantly share code, notes, and snippets.

Avatar

Simon Walker stwalkerster

View GitHub Profile
@stwalkerster
stwalkerster / sfnet2github.sh
Created May 17, 2011
SourceForge.net svn repo to github git repo import script
View sfnet2github.sh

Licence (MIT Licence)

Copyright (c) 2011 Simon Walker

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@stwalkerster
stwalkerster / postmanage.sh
Created Dec 28, 2012
Postfix queue management script
View postmanage.sh
#!/bin/bash
app="whiptail --backtitle 'Postfix Queue Manager - stwalkerster.net Cluster' --clear --nocancel"
while true; do
queue=`ls /var/spool/postfix/hold/`
menulist=""
for i in $queue; do
@stwalkerster
stwalkerster / bad.php
Created Jan 31, 2016
dependency injection primer
View bad.php
<?php
class PetrolEngine {
public function vroom() {}
}
class Car {
private $engine = new PetrolEngine();
public function goFaster() {
View acc_extlinks
View templates_link.tpl
View gist:5995556
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Message" company="Simon Walker">
// Simon Walker
// </copyright>
// <summary>
// The message.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace SiteFrameworkMessageComparer
View 1-Minecraft station command blocks.md

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.

View gist:5390381
select page_namespace, page_title, iwl_text from iwlinks inner join page on page_id = iwl_from where iwl_prefix = "tools" and iwl_title like "~acc/%";
select distinct page_namespace, page_title, el_to from externallinks inner join page on page_id = el_from where el_index LIKE "http://org.toolserver./~acc/%" or el_index LIKE "https://org.toolserver./~acc/%";
@stwalkerster
stwalkerster / update.sh
Last active Dec 16, 2015
RRD update for ACC graphs
View update.sh
#!/bin/bash
cd /home/stwalkerster/rrd/acc-new/
wget --no-check-certificate -O status.xml -o /dev/null https://toolserver.org/~acc/api.php?action=status
cat status.xml | sed "s/</\r\n</g" | grep status | sed "s/ /\n/g" | sed "s/\"\/>/\"/" | grep -v "<status" | head -n4 |sed "s/\"//g" > values
rm status.xml
chmod a+x values
. values