Skip to content

Instantly share code, notes, and snippets.

View micolous's full-sized avatar
💭
I may be slow to respond.

micolous micolous

💭
I may be slow to respond.
View GitHub Profile
<?xml version="1.0"?>
<BeverageDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Beverages>
<Beverage Name="Mercury Draught" Volume="375" PercentAlcohol="5.2">
<Skus>
<Sku Barcode="9300679040910" Quantity="1" IsEnabled="true" />
</Skus>
</Beverage>
<Beverage Name="Strongbow Sweet" Volume="355" PercentAlcohol="5">
<Skus>
@micolous
micolous / output.txt
Created July 1, 2012 14:22
pointer arithmatic
a (value) = 42
a (addr) = 80484B0FFCEBB78
incrementing...
a (value) = -3228804
a (addr) = 80484B0FFCEBB7C
--- a/arch/x86/boot/cpu.c 2012-07-31 21:34:00.000000000 +0930
+++ b/arch/x86/boot/cpu.c 2012-07-31 22:36:03.000000000 +0930
@@ -17,6 +17,7 @@
#include "boot.h"
#include "cpustr.h"
+#define SKIP_VALIDATE_CPU
static char *cpu_name(int level)
{
C:\Users\michael>tracert koji.micolous.id.au
Tracing route to koji.tok0.micolous.id.au [106.187.98.32]
over a maximum of 30 hops:
1 2 ms 3 ms 2 ms 192.168.43.1
2 469 ms 589 ms 529 ms 10.5.133.19
3 * * * Request timed out.
4 520 ms 856 ms 610 ms 10.5.133.6
5 176 ms 113 ms 117 ms Bundle-Ether12.cha45.Brisbane.telstra.net [110.142.0.189]
@micolous
micolous / conroy.py
Created September 5, 2012 09:18
Conroy logic generator (ca. 2010)
#!/usr/bin/python2.4
# please share your additions with me: http://micolous.id.au/contact-me
verbs = ['hate','translocate','watch','like','shake','attack','eat','engineer','wrestle','throw','evaporate','think about','discover','buy','consult','roast','boil','enjoy','critique','call','photograph','play with','contact','sing with','discuss','thrill','hack','forecast','replace guns with','issue','recieve','refuse to sponsor','conspire with','conspire against','purchase computers from','play football with','talk to','clean','spread rumours about','fine','damage','troll','vote for','lose','offer','compensate','irrigate','pave','are not','are','make forum posts about','have']
nouns = ['plumbers','bicycles','balls','corn','peas','beetroot','clocks','chairs','cameras','unicorns','children','pirates','hands','songs','trucks','senators','digital television','laptops','sausages','foghorns','telstra','barbarians','ewoks','the nbn','dr. tran','books','walkie-talkies','black stars','francis wheat','mplayer','valhalla','rel
// Laptop control software
#include <SoftwareSerial.h>
#include <SerialLCD.h>
//#include <NewSoftSerial.h>
#include <math.h>
const int laptopRelayPin = 7;
const int tempPin = 0;
int pcConnected = 0;
@micolous
micolous / fizzbuzz.py
Created November 20, 2012 13:08
fizzbuzz
#!/usr/bin/env python3
# micolous' implementation of fizzbuzz ;) (python2.6, 3.3 compat)
from __future__ import print_function
# setup a table of all the possible divisors (z)
z = {5: 'buzz', 3: 'fizz'}
# iterate through possible numbers (1 - 14) and populate that table with
# the other possible divisors <15: 6, 9, 10, 12. can use "any" on the
# iterator here as every result of this is bool() == False (False, None)
@micolous
micolous / null-kwargs.py
Last active December 10, 2015 20:58
null kwargs strangeness
#!/usr/bin/env python
def some_operation(foo=0):
print ("foo is %r" % foo)
def kwargs_print(**kwargs):
print ("you gave me %r" % kwargs)
a = {}
@micolous
micolous / sentry-simplejson-dj15.txt
Created April 30, 2013 02:50
Sentry traceback on Django 1.5.1 with simplejson use instead of Python's json.
Environment:
Request Method: GET
Request URL: http://localhost:8015/sentry/myteam/
Django Version: 1.5.1
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
// Test code for Adafruit GPS modules using MTK3329/MTK3339 driver
//
// This code just echos whatever is coming from the GPS unit to the
// serial monitor, handy for debugging!
//
// Tested and works great with the Adafruit Ultimate GPS module
// using MTK33x9 chipset
// ------> http://www.adafruit.com/products/746
// Pick one up today at the Adafruit electronics shop
// and help support open source hardware & software! -ada