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 / 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)
@koo5
koo5 / pre-commit
Created February 12, 2011 00:26
my net radios
grep -v '^#' playlist.m3u8 > tmp
mv tmp playlist.m3u8
git add playlist.m3u8
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 / config
Created March 11, 2012 14:19
whisperbot
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 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>