Skip to content

Instantly share code, notes, and snippets.

@koo5
koo5 / gist:784241
Created Jan 18, 2011
sdl 1.2.14 patch for making a compositing window manager
View gist:784241
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)
@koo5
koo5 / pre-commit
Created Feb 12, 2011
my net radios
View pre-commit
grep -v '^#' playlist.m3u8 > tmp
mv tmp playlist.m3u8
git add playlist.m3u8
View pyfirmata
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
View gist:1545056
#include <stdio.h>
#define foo "xxxx"
#define bar "yyyy"
const char * ggg = bar foo;
void main()
{
View sort.py
import sys
for i in sorted(sys.stdin.readlines()):
sys.stdout.write(i)
@koo5
koo5 / biff.pnp
Created Jan 22, 2012
pohoda <> fio cvs diff
View biff.pnp
<?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 Jan 22, 2012
list all aliases
View index.php
<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 Jan 22, 2012
my version of mpdtube.pl
View 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 / config
Created Mar 11, 2012
whisperbot
View config
server = "server.themanaworld.org"
port = 6901
account = ""
password = ""
character = 0#slot character is in, 0 for first, 1 for second, 2 for third
charactername = ""
master = "" #character bot will direct public chat to
sit = 0 # become inconspicuous
color_replacement_regex = '' #r'\1 ' to keep em
@koo5
koo5 / Settings.plist
Created Apr 10, 2012
git friendly inform7 project skeleton
View Settings.plist
<?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>
You can’t perform that action at this time.