Skip to content

Instantly share code, notes, and snippets.

View KWKdesign's full-sized avatar

Kevin Klingelhoefer KWKdesign

View GitHub Profile
@KWKdesign
KWKdesign / sv_last_tic_duration.sql
Last active August 29, 2015 14:03
Schemaverse: Last Tic Duration
select
( select toc from my_events
where public and action = 'TIC'
and tic = ( select last_value-1 from tic_seq )
)::time -
( select toc from my_events
where public and action = 'TIC'
and tic = ( select last_value-2 from tic_seq )
)::time
;
@KWKdesign
KWKdesign / sv_trophies.sql
Last active August 29, 2015 14:03
Schemaverse: Trophies Last Round
select name, weight, description
from player_trophy, round_seq, trophy
where 1=1
and player_id = get_player_id(session_user)
and round = last_value-1
and id = trophy_id
;
@KWKdesign
KWKdesign / schemaverse-svg.pl
Last active August 29, 2015 13:56
Schemaverse Ship Visualizer
#! /usr/bin/perl
use 5.010;
use strict;
use warnings;
use Data::Dump qw/dd ddx dump/;
use DBI;
use SVG;
use Template;
use File::Temp qw/tempfile/;
@KWKdesign
KWKdesign / sources.list
Last active January 4, 2016 21:19
Setup Apt on Debian Wheezy
deb http://http.debian.net/debian wheezy main
deb-src http://http.debian.net/debian wheezy main
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main
deb-src http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main
deb http://packages.dotdeb.org wheezy all