Skip to content

Instantly share code, notes, and snippets.

SunVox Cheatsheet

inputting notes

a track is made up of this

note

@aji
aji / do.py
Last active December 16, 2015 19:49
#!/usr/bin/python
from random import choice, randint
import weechat
NAME = 'do'
AUTHOR = 'aji <http://ajitek.net>'
VERSION = '1.0'
LICENSE = 'MIT'
DESC = 'print commands before doing them'
@aji
aji / ajibot.py
Last active December 16, 2015 02:09
import sys, socket, shlex
from random import choice, randint
class linebuf:
def __init__(self):
self.s = ['']
def data(self, data):
self.s[-1:] = (self.s[-1] + data).split('\r\n')
lines, self.s = self.s[:-1], self.s[-1:]
return lines
@aji
aji / ed.c
Created March 12, 2013 21:46
4.3 BSD ed
#ifndef lint
static char sccsid[] = "@(#)ed.c 4.5 (Berkeley) 8/12/86";
#endif
/*
* Editor
*/
#define CRYPT
#include <signal.h>
@aji
aji / unicorn.py
Created January 8, 2013 15:45
libunicorn ported to python
#!/usr/bin/env python3
from collections import namedtuple
IRC_Source = namedtuple('IRC_Source', 'nick ident host')
IRC_Message = namedtuple('IRC_Message', 'source command args')
def message_source_parse(spec):
spec, _, host = spec.partition('@')
nick, _, ident = spec.partition('!')
@aji
aji / weelog.awk
Created May 27, 2012 22:34
weelog -- easily convert chat logs formatted by weechat into a format more typical of IRC logs
#!/usr/bin/awk -f
BEGIN { FS="\t"; }
{
split($1, timesplit, / +/);
time = timesplit[2]
if (time == "")
time = "--:--:--";
/*
* libmowgli: A collection of useful routines for programming.
* linetest.c: Testing of the linebuffer
*
* Copyright (c) 2011 William Pitcock <nenolod@dereferenced.org>
* Copyright (c) 2012 Elizabeth J. Myers <elizabeth@sporksmoo.net>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
@aji
aji / pinkie.py
Created April 13, 2012 19:29
IRC server in a single Python 3 script (only partially complete)
#!/usr/bin/python
# pinkie.py -- Proof-of-concept IRCd written in Python
# [40] alex@theta pinkie $ grep ^class pinkie.py
# class Pollable:
# class Timer:
# class TimerRepeat(Timer):
# class AsyncListen(Pollable):
# class AsyncLine(Pollable):
# class AsyncLoop: