Skip to content

Instantly share code, notes, and snippets.

View lotherk's full-sized avatar

Konrad Lother lotherk

View GitHub Profile
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1Wg4Xpvw4HZo62Hy6uxgiNLtOikRh1f0BvLUSSTFM/pts84OUBXFvoQFJ+Npo+ak5AO5t40td031QnlDnmjqWGra2hTYQAaxyne7+xA5jWvlcsmeMY08rRFUo7GPpjE9zRFHYVA4Sr6R4TDckq+nUcKLf126Ze6TeX5NiQEj4I2KpNPLHBwxykcf7QxOn09PFiOHERq9ODe8iSqt880jJZnBtjzWN+LA5Jc4+f6ljDAqP7nof8vNSDqIL/FwkBOFm9ztw/bDMs6aJ7H5mriOkPFgsVrZNLHAf5P6afY4A7oEtiuEnBTbSkCKweLQ+6dOKh5WnWvd6ubidfYlCWFQT Konrad Lother
#include <stdio.h>
#include <stdlib.h>
typedef struct array {
void *array;
size_t used;
size_t size;
} array_t;
// initializes an array.
[ActiveShadows]
Color=75,75,75
ColorType=5
HOffset=10
Size=29
VOffset=20
[KWin]
BorderSize=3
CustomShadows=true
#!/bin/bash
/usr/bin/jackd -R -p128 -t2000 -dalsa -dhw:1 -r48000 -p256 -n3 -X raw &
jack_wait -w
Xvfb -screen 0 800x480x24 &
sleep 1
export DISPLAY=:0
/usr/bin/x11vnc -xkb -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log &
sleep 1
/root/bin/xwax -k -g 800x480 -j deck_0 -j deck_1 -l /mnt/music &
sleep 2
@lotherk
lotherk / gist:fe6b0d56a1711b37c505
Created September 24, 2014 11:13
dcs_intercom glovepie script
if pressed(Key.Backslash) {
debug = "intercom"
var.intercom = true
}
if released(Key.F12) or released(Key.Backslash) {
debug = "close intercom"
var.intercom = false
var.cmd = false
}
@lotherk
lotherk / vpnroute.sh
Created June 20, 2014 10:46
vpnroute.sh
#!/bin/sh
GW_IFACE="mun0"
GW_IP="172.16.37.1"
LOCAL_IP="172.16.37.2"
ROUTE_PORTS="80 443 25 110 143 993"
MARK=2
TABLE=2
@lotherk
lotherk / gist:e3ce62a2bc4ac746ad16
Created May 10, 2014 13:37
xpadder space engineers (w/ force feedback)
;--- Xpadder Controller File ---
DataType=Controller
Version=2013.07.18
[Button Locations]
Button1Location=16,96
Button2Location=46,96
Button3Location=76,96
Button4Location=106,96
Button5Location=136,96
module TTVDB
def self.logger(output=STDOUT)
unless @logger
@logger = Logger.new(output)
@logger.formatter = proc { |severity, datetime, progname, msg|
kaller = caller[4]
file, ln, func = kaller.split(":")
_nil, func = func.split("`")
func.gsub!(/[<>']/, "")
file = File.basename(file)
require 'logger'
logger = Logger.new(STDOUT)
logger.formatter = proc { |severity, datetime, progname, msg|
"#{datetime} #{severity} #{caller[4]}: #{msg}"
}
logger.info "This is a log message"
module A
def self.a
puts caller[0]
end
def self.b
self.a
end
end