Skip to content

Instantly share code, notes, and snippets.

#define zenburn_fg #dcdccc
#define zenburn_bg_1 #282828
#define zenburn_bg #3f3f3f
#define zenburn_bg_01 #4f4f4f
#define zenburn_bg_02 #5f5f5f
#define zenburn_black #000000
#define zenburn_blue_01 #94bff3
#define zenburn_blue #8cd0d3
#!/bin/ksh
set -e
[ $# -ge 1 ] || (echo "usage: $1 [update|kernel]"; exit 1)
function update {
echo "Updating xenocara..."
(cd /usr/xenocara && cvs up -Pd)
}
@irl
irl / scramble.c
Created October 31, 2019 20:51
file scrambler
#include <stdio.h>
int
main(int argc, char **argv)
{
int c, r;
r = 0;
while ((c = getc(stdin)) != EOF) {
r = (13 * r + 249) & 0xff;
putc(c ^ r, stdout);
@irl
irl / helper.py
Created January 16, 2015 23:46
BeamerBot
# Import some necessary libraries.
import socket, collections
lines = collections.deque(maxlen=10)
for x in range(0, 10):
lines.append("")
# Some basic variables used to configure the bot
server = "irc.freenode.net" # Server
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option drop_invalid '1'
option synflood_protect '1'
option synflood_rate '200/s'
option synflood_burst '500'
option tcp_ecn '1'
/*
* Copyright (c) 2014, Iain R. Learmonth.
* All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@irl
irl / ab24-plot-temps-machine.r
Created May 2, 2013 06:12
Honours Project Data Analysis in R
library(rrdf)
g <- load.rdf("sparql.rdf")
rs <- sparql.rdf(g, "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX qudt: <http://qudt.org/1.1/schema/qudt#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ssn: <http://purl.oclc.org/NET/ssnx/ssn#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?temperature ?time WHERE {
?sensor rdf:type <http://uktemp.net/ont/#WundergroundTemperatureSensingDevice> .
?observation ssn:observedProperty <http://uktemp.net/dataset/temperature/AB24> .
@irl
irl / .zshrc
Last active November 11, 2021 00:08
My .zshrc file
#!/usr/bin/env zsh
### Fix rxvt to work on machines that don't know about
### the 256color variant
if [ $TERM = "rxvt-unicode-256color" ]; then
export TERM="rxvt-unicode"
fi
### History settings
@irl
irl / gist:4280877
Created December 13, 2012 22:56
A shell script written towards the end of the assessment period in the first half of my fourth year of University. I do not recommend using it as your .bashrc file.
# fuckup.sh
#
# (C) Iain R. Learmonth 2012.
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.
#