Skip to content

Instantly share code, notes, and snippets.

View turbolent's full-sized avatar

Bastian Müller turbolent

View GitHub Profile
(defmodel other ()
((content :accessor content
:initarg :content
:initform (c-in "Test"))))
(defmodel node ()
((elements :accessor node-elements
:initarg :elements
:initform '())
(first-element :reader first-element
;; automatic initarg c-in
;; by Ramarren
(defclass auto-cin-model ()
())
(defun class-initargs (class)
(let ((slots (closer-mop:class-slots class)))
(let ((class-initargs
(mapcar #'closer-mop:slot-definition-initargs slots)))
#!/bin/bash
scrot -s -e 'convert $f `basename $f .png`.tif ; \
tesseract `basename $f .png`.tif `basename $f .png` ; \
xclip -i `basename $f .png`.txt ; \
rm `basename $f .png`*'
PortSystem 1.0
name chicken
version 4.2.0
categories lang scheme
maintainers gmail.com:arto.bendiken waqar gmail.com:ivan.g.raikov
description Compiler for the Scheme programming language
long_description \
Chicken produces portable, efficient C, supports almost all \
of the current Scheme language standard, the Revised5 Report \
on the Algorithmic Language Scheme (R5RS ), and includes many \
@turbolent
turbolent / optware-bootstrap-kindle.sh
Created January 22, 2011 14:16
Bootstrap optware on Kindle
#! /bin/sh
FAILED=0
# remount
echo -n "Re-mounting rw: "
mntroot rw > /dev/null 2>&1 || FAILED=1
if [ "$FAILED" = 1 ] ; then
echo FAILED
exit 1
function inherit (_class, superclass) {
_class.prototype.__proto__ = superclass.prototype;
}
function generic (name) {
return function () {
var _arguments = Array.prototype.slice.call(arguments);
var object = _arguments[0];
var methods = [];
if (object.constructor.prototype.hasOwnProperty(name))
@turbolent
turbolent / convert-fahrplan-to-rdf.xsl
Created August 12, 2011 14:41
Chaos Communication Camp 2011 Fahrplan RDF converter
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="rooms-base" select="'http://events.ccc.de/camp/2011/wiki/'" />
<xsl:param name="events-base" select="'http://events.ccc.de/camp/2011/Fahrplan/events/'" />
<xsl:param name="speakers-base" select="'http://events.ccc.de/camp/2011/Fahrplan/speakers/'" />
<xsl:output method="text"/>
<xsl:strip-space elements="*" />
@turbolent
turbolent / gist:1597185
Created January 11, 2012 22:31
neko.py
from urllib import urlopen, unquote
from urlparse import urljoin
from collections import defaultdict
from os.path import expanduser, basename, splitext
from optparse import OptionParser
from xml.etree.ElementTree import XMLParser
import re
from pickle import dump, load
packages = {}
#!/usr/bin/env ruby
# Usage: ragel_utf8_range.rb <start> <end>
#
# This script is based on unicode2ragel.rb by Rakan El-Khalil <rakan@well.com>,
# which was originally written as part of the Ferret search engine library.
###
# Formats to hex at minimum width

Keybase proof

I hereby claim:

  • I am turbolent on github.
  • I am turbolent (https://keybase.io/turbolent) on keybase.
  • I have a public key ASCIkPRb4ueEZYSbYShdisf2G7voTmDu5KW0ie2qDMNlLQo

To claim this, I am signing this object: