Skip to content

Instantly share code, notes, and snippets.

require('xts')
require('lubridate')
file <- 'tageswerte-1948-2012.csv'
data <- read.csv(file, header = TRUE, sep = ',')
timeseries <- xts(data$LUFTTEMPERATUR, as.Date(ymd(data$MESS_DATUM))
plot(timeseries, screens = 1)
@Su-Shee
Su-Shee / pgtap example
Created January 24, 2014 10:56
basic pgtap testing
BEGIN;
SELECT plan(8);
-- does your table even exist and does it have a primary key?
SELECT has_table('users');
SELECT has_pk('users');
-- does it have the column username and what type is it?
SELECT has_column('users', 'username');
SELECT col_not_null('users', 'username');
@Su-Shee
Su-Shee / valentine.vim
Created February 13, 2014 21:23
I made you all a valentine's vim color scheme! ♥
set background=dark
highlight clear
if exists("syntax on")
syntax reset
endif
let g:colors_name="valentine"
hi Normal guifg=#fabef5 guibg=#000000
hi Comment guifg=#8c0888 guibg=NONE
hi Constant guifg=#ff00ff guibg=NONE
hi String guifg=#a3069e guibg=NONE
older stuff:
./configure --enable-system-cairo --enable-libxul --enable-storage --disable-safe-browsing --disable-parental-controls --enable-canvas-3d --enable-smil --enable-tree-freetype --disable-gnomevfs --disable-gnomeui --enable-application=browser --enable-default-toolkit=cairo-gtk2 --prefix=/opt/firefox --disable-libnotify --disable-javaxpcom --enable-gio
newer versions:
./configure --enable-system-cairo --enable-gio
--disable-parental-control --disable-gnomeui --disable-gnomevfs
--enable-application=browser --enable-default-toolkit=cairo-gtk2
--prefix=/opt
@Su-Shee
Su-Shee / README.md
Created February 28, 2014 17:55 — forked from anonymous/README.md

Part 1

Proof of concept

Say, you want to save your D3 application in a CouchDB database. This is just a proof of concept that this is possible. I use the »Focus + Context« diagram by Mike Bostock (http://bl.ocks.org/1667367) as an example.

Prerequisites:

export LC_CTYPE="de_DE.utf8"
export LC_COLLATE="de_DE.utf8"
export LANG=en_US.utf8
export LC_PAPER="de_DE.utf8"
#export XMODIFIERS="@im=SCIM"
#export XIM_PROGRAM="scim -d"
#export GTK_IM_MODULE=scim
#export QT_IM_MODULE=scim
#scim -f socket -ns socket -d
#scim -f x11 -s socket -c socket -d
javascript:mod%20=%20document.querySelectorAll('li%20a[href^="/pod/"]');%20cpan=mod[1].href;%20enc%20=%20'https://sushee.no-ip.org/?user=WHATEVERANYTHING&marzipan='%20+%20encodeURIComponent(cpan);%20req%20=%20new%20XMLHttpRequest();%20req.open('GET',%20enc,%20true);%20req.send(null);
#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
use Selenium::Remote::Driver;
my $driver = Selenium::Remote::Driver->new();
#!/usr/bin/env ruby
require 'sinatra';
require 'slim';
allcats = Dir.entries('public/catpics/')
get '/' do
slim :index
end
#!/usr/bin/env perl
use Dancer2;
set 'template' => 'template_toolkit';
opendir(my $dir, 'public/catpics/') or die "Can't open kittydir!";
my @catpics = readdir($dir);
get '/' => sub {