Skip to content

Instantly share code, notes, and snippets.

@Jonty
Jonty / flip.py
Created February 21, 2014 19:26
IRCCat (using command_runner) command for table flipping.
#!/usr/bin/python
# coding=utf8
import sys
import upsidedown
if len(sys.argv) != 6:
sys.exit()
table_string = upsidedown.transform(sys.argv[5])
output = u"(╯°□°)╯︵ ┻━" + table_string + u"━┻"
#!/bin/env/python
import socket
import string
import time
recieve_address = ('0.0.0.0', 12000)
send_address = ('127.0.0.1', 9998)
# Set a mapping to -1 to ignore messages
# Set a mapping to 0 to pass them through rather than delaying
#!/bin/env/python
import socket
import string
import time
recieve_address = ('0.0.0.0', 12000)
listen = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
listen.bind(recieve_address)
import random
class Node:
def __init__(self, children):
self.children = []
root = Node([])
nodes_to_process = [root]
count = 0
@Jonty
Jonty / emf_cfp_email.txt
Created July 14, 2014 14:27
Electromagnetic Field 2014 Call For Participation
Hello!
Electromagnetic Field (EMF) is a volunteer-run non-profit maker/hacker camping festival in the UK. We held our first event in 2012, and this year we're back and bigger than ever: a camping festival with over 1200 people of all ages, just outside Milton Keynes for a long weekend between the 29th and 31st of August.
We run this event to promote people making and learning things across as many disciplines as possible. We'll take over a large field, roll out power and internet to every tent, and put on talks and workshops for three days.
If you'd like a better idea of what that looks like, our website might help:
https://www.emfcamp.org/about
Our Call For Participation is open: we're looking for people to talk or give workshops. At previous events, we've had a huge variety of talks on everything from genetic modification to electronics, blacksmithing to high-energy physics, reverse engineering to lock picking, computer security to crocheting, and quadcopters to brewing. If you'd like to talk, we'll try
@Jonty
Jonty / kvagrant.sh
Last active August 29, 2015 14:06
A bash alias to allow you to invoke vagrant commands on chef-kitchen created VM's.
function kitchenvagrant {
shopt -s nullglob
COMMAND=$1
VM=$2
BASEPATH=".kitchen/kitchen-vagrant/"
VPATH="."
if [ ! -e ".kitchen/kitchen-vagrant/" ]; then
echo "Can't find .kitchen - are you in the correct path?"
return
@Jonty
Jonty / forest.py
Created November 3, 2014 17:38
Stub tree updater in python for Charles
from threading import Thread, Timer
import socket
# Open a UDP netcat session to this with `nc -vu localhost 1337`
# It takes updates in the form "key value" and will print out the current state from the "sender" thread every 5s
state = {
}
def read_state(socket):
@Jonty
Jonty / wagesforfacebook.md
Last active August 29, 2015 14:10
wagesforfacebook.com is unreadable. Here's the text.

wagesforfacebook.com

Author: Laurel Ptak (http://laurelptak.com)

They say it’s friendship. We say it’s unwaged work. With every like, chat, tag or poke our subjectivity turns them a profit. They call it sharing. We call it stealing. We’ve been bound by their terms of service far too long—it’s time for our terms.

To demand wages for facebook is to make it visible that our opinions and emotions have all been distorted for a specific function online, and then have been thrown back at us as a model to which we should all conform if we want to be accepted in this society. Our fingertips have become distorted from so much liking, our feelings have gotten lost from so many friendships.

Capital had to convince us that it is a natural, unavoidable and even fulfilling activity to make us accept unwaged work. In its turn, the unwaged condition of facebook has been a powerful weapon in reinforcing the common assumption that facebook is not work, thus preventing us from struggling against it. We ar

@Jonty
Jonty / Vagrantfile
Created March 4, 2015 14:28
Start kitchen-vagrant VM's in headed mode
~/.vagrant.d/Vagrantfile
Vagrant.configure('2') do |config|
config.vm.provider "virtualbox" do |v|
v.gui = true
end
end
@Jonty
Jonty / dorkbot_5000.txt
Created March 10, 2015 00:35
dorkbot 5000
jonty@towel:~$ python
>>> import datetime
>>> from dateutil.relativedelta import relativedelta
>>> FIRST_DORKBOT = datetime.date(year=2001, month=11, day=7)
>>> (FIRST_DORKBOT + relativedelta(days=5000)).isoformat()
'2015-07-17'