Skip to content

Instantly share code, notes, and snippets.

View kybernetyk's full-sized avatar
💸
0x90

kyb kybernetyk

💸
0x90
View GitHub Profile
@kybernetyk
kybernetyk / vhosts.conf
Created May 28, 2011 12:17
go server behind apache
<VirtualHost *:80>
ServerName fettemama.org
ServerAlias www.fettemama.org
ProxyPass / http://85.17.133.6:9876/
ProxyPassReverse / http://85.17.133.6:9876/
ErrorLog /var/www/fettemama/logs/error_log
CustomLog /var/www/fettemama/logs/access_log combined
CustomLog /var/www/fettemama/logs/referer_log referer
</VirtualHost>
@kybernetyk
kybernetyk / gist:939698
Created April 24, 2011 17:01
linux frickelei
http://forums.fedoraforum.org/forumdisplay.php?f=61
/usr/libexec/gnome-settings-daemon & # handles themes, starts gnome-screensaver. You may have to use gconf to disable it setting the background.
nm-applet & # assuming you're using Network Manager
gnome-power-manager & # for laptops and stuff
gnome-volume-control-applet & # fommr mounting CDs, USB sticks, and such
xcalib /etc/xcalib/Color\ LCD-00000610-0000-9CA0-0000-000004272800.icc
@kybernetyk
kybernetyk / mgotest.go
Created April 20, 2011 17:11
mgo int64 struct member unpacking
package main
import (
"fmt"
"launchpad.net/mgo"
)
type MyStruct struct {
A int64
B int
@kybernetyk
kybernetyk / gist:917774
Created April 13, 2011 15:38
MACHS GANS!
package main
import (
"fmt"
"regexp"
)
func main() {
r := `<.*?>`
s := "<b>ich mag <3 tiere</b><a href='http://www.heise.de'>lol</a>"
@kybernetyk
kybernetyk / echo_channel.go
Created April 6, 2011 11:25
Concurrent Echo Server in GO (CHANNELS ARE THE WAR!)
package main
import (
"net"
"os"
"fmt"
"bufio"
"strings"
)
@kybernetyk
kybernetyk / gist:845512
Created February 26, 2011 19:14
iterator muell
std::vector<int> x;
x.push_back(1);
x.push_back(2);
x.push_back(3);
x.push_back(4);
x.push_back(5);
x.push_back(3);
x.push_back(5);
std::vector<int>::iterator it = x.begin();
@kybernetyk
kybernetyk / gist:804875
Created January 31, 2011 21:40
lol simple webzeug
#!/usr/bin/env python
import os
import json
news_items_fmunch = [
{ "text" : "How to play fruit munch ...", "link" : "http://www.minyxgames.com/promos/fmunch_howtoplay.html" },
{"text" : "Welcome to fruit munch!"},
{"text" : "Get the game for free. Read how ...", "link" : "http://www.minyxgames.com/promos/free_fmunch.html"},
{"text" : "New feature: The Full Game!", "link" : "minyxstore://com.minyxgames.fruitmunch.1"},
@kybernetyk
kybernetyk / xmodmap
Created January 27, 2011 20:41
xmodmap for macbook pro
keycode 51 = numbersign asciitilde
keycode 94 = backslash bar
keycode 11 = 2 quotedbl
keycode 48 = apostrophe at
@kybernetyk
kybernetyk / gist:777757
Created January 13, 2011 11:52
Everything is by value in C.
#include <stdio.h>
void foo (int *p)
{
printf ("\t1. p is pointing to: %p\n", p);
p = 0;
printf ("\t2. p is pointing to: %p\n", p);
}
@kybernetyk
kybernetyk / gist:763311
Created January 3, 2011 09:54
tail .zshrc xD
#
##
setopt auto_pushd
setopt PUSHD_IGNOREDUPS
setopt PUSHD_SILENT
setopt no_beep