Skip to content

Instantly share code, notes, and snippets.

View koo5's full-sized avatar
💭
github sucks

koo5

💭
github sucks
View GitHub Profile
@koo5
koo5 / x
Created July 23, 2015 23:20
x
kook@idea ~/C/tauchain> cat n3test2.nq
:x a :y .
:x a :z .
fin.
:x a :y .
:x a :z .
fin.
kook@idea ~/C/tauchain> env LD_PRELOAD=libmarpa/dist/.libs/libmarpa.so ./tau --level 1 --shorten < n3test2.nq
kb input done.
query loaded.
@koo5
koo5 / gist:784241
Created January 18, 2011 09:59
sdl 1.2.14 patch for making a compositing window manager
diff --git a/SDL-1.2.14/src/video/x11/SDL_x11events.c b/SDL-1.2.14/src/video/x11/SDL_x11events.c
index da57528..d0ce0f3 100644
--- a/SDL-1.2.14/src/video/x11/SDL_x11events.c
+++ b/SDL-1.2.14/src/video/x11/SDL_x11events.c
@@ -817,7 +817,7 @@ printf("MapNotify!\n");
#ifdef DEBUG_XEVENTS
printf("ConfigureNotify! (resize: %dx%d)\n", xevent.xconfigure.width, xevent.xconfigure.height);
#endif
- if(SDL_Window == xevent.xconfigure.window)
+ if(WMwindow == xevent.xconfigure.window)
StandardFirmata_2_2_forUNO_0_3
pyfirmata
set baudrate 57600 in sketch & pyfirmata.py
set port name in util.py
>>> import pyfirmata
>>> from util import get_the_board
>>> board=get_the_board()
>>> board.firmata_version
#include <stdio.h>
#define foo "xxxx"
#define bar "yyyy"
const char * ggg = bar foo;
void main()
{
@koo5
koo5 / sort.py
Created January 22, 2012 01:31
sort.py
import sys
for i in sorted(sys.stdin.readlines()):
sys.stdout.write(i)
@koo5
koo5 / biff.pnp
Created January 22, 2012 01:47
pohoda <> fio cvs diff
<?php
$fio = array();
$a = fopen("dz-pohyby.cgi", "r");
for($i=0;$i<10;$i++)
fgets($a);
while($b=fgets($a))
$fio[] = explode(";", $b);
$fio=array_splice($fio,0,sizeof($fio)-2);
for($i=0;$i<sizeof($fio);$i++)
@koo5
koo5 / index.php
Created January 22, 2012 11:20
list all aliases
<html><body><h1>It works!</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added, yet.</p>
<?php
$handle=opendir('/etc/apache2/conf.d');
$it = array();
while (false !== ($file = readdir($handle)))
{
@koo5
koo5 / mpdtube.pl
Created January 22, 2012 11:26
my version of mpdtube.pl
#!/usr/bin/perl -w
#
# mpdtube.pl
# version 0.2
# author Johan Ask
#
# Script to download youtube clips, convert to mp3 and add to an mpd playlist.
#
@koo5
koo5 / Settings.plist
Created April 10, 2012 18:12
git friendly inform7 project skeleton
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.
com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IFCompilerOptions</key>
<dict>
<key>IFSettingNaturalInform</key>
<true/>
</dict>
@koo5
koo5 / story.ni
Created April 15, 2012 15:35
bored dance
"dance of boredom" by kook
"sitting somewhere between pseudocode and real inform7, making inform seem much more likeable than it is, unplugged from the world, this node stares cross-eyed into space"
world is a room.