This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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/; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with max_xy as ( | |
select greatest( | |
max( abs( location_x ) ), | |
max( abs( location_y ) ) | |
) v | |
from planets | |
), | |
scale as ( | |
select m * ceil( v / m ) scale from ( | |
select 10 ^ floor( log( v ) ) m, v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with max_xy as ( | |
select greatest( | |
max( abs( location_x ) ), | |
max( abs( location_y ) ) | |
) v | |
from planets | |
), | |
scale as ( | |
select m * ceil( v / m ) scale from ( | |
select 10 ^ floor( log( v ) ) m, v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- while ( select count(1) from planet ) < ( select count(1) from player ) * 1.05 loop | |
while ( select count(1) from planet ) < 2000 loop | |
for new_planet in | |
select nextval( 'planet_id_seq' ) as id, | |
case ( random() * 11 )::integer % 12 | |
when 0 then 'Aethra_' || generate_series | |
when 1 then 'Mony_' || generate_series | |
when 2 then 'Semper_' || generate_series | |
when 3 then 'Voit_' || generate_series | |
when 4 then 'Lester_' || generate_series |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
100000::numeric radius, | |
0::numeric y, | |
0::numeric a, | |
0::numeric b, | |
( null )::point ta, | |
( null )::point tb, | |
0::numeric angle, | |
1::int i, | |
0::int cnt, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace function pg_temp.rot13( string text ) | |
returns text as $rot13$ | |
begin | |
return translate( string, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm' ); | |
end $rot13$ language plpgsql; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into my_fleets ( name ) values ( 'main' ); | |
update my_fleets set | |
script_declarations = ' | |
my_player_id int := get_player_id( session_user ); | |
cash bigint; | |
ship record; | |
planet record; | |
target record; | |
', |
OlderNewer