Skip to content

Instantly share code, notes, and snippets.

View defel's full-sized avatar
🐧
I use arch btw

defel

🐧
I use arch btw
View GitHub Profile
<?php
error_reporting(1);
function parseXML() {
$xmlfile = 'delicious.xml';
$xml = simplexml_load_file($xmlfile);
foreach($xml->post as $post) {
$tags = $post['tag'];
@defel
defel / jmstv_neindanke_gimpforum.js
Created December 1, 2010 15:49
Das abgeänderte Java-Script für das Gimpforum, einmalige Einblendung über Cookies, ohne bestimmte Uhrzeit.
//
// Script für #JMStV Protest
//
// Autor: Horst Klier (http://www.abgekliert.de)
//
// Kopieren und ändern ausdrücklich erlaubt. Bei sinnvollen Ergänzungen bitte auch Hinweis an mich (horst@klier.net).
//
//
function PageSizeY () {
(derive ::rect ::shape)
(defmulti bar (fn [x y] [x y]))
(defmethod bar [::rect ::shape] [x y] :rect-shape)
(defmethod bar [::shape ::rect] [x y] :shape-rect)
(bar ::rect ::rect)
-> java.lang.IllegalArgumentException:
Multiple methods match dispatch value:
[:user/rect :user/rect] -> [:user/rect :user/shape]
[program:beerscore]
command=/usr/local/bin/php beerscore_bot.php
numprocs=1
directory=/home/sean/findpint/twitterbot
stdout_logfile=/home/sean/findpint/twitterbot/supervisord.log
environment=BEERSCORE_USER=beerscore,BEERSCORE_PASS=[redacted]
autostart=true
autorestart=true
user=beerscore
import XMonad
main = xmonad defaultConfig
{ modMask = mod4Mask -- Use Super instead of Alt
, terminal = "urxvt"
-- more changes
}
Scenario: Install cucumber
Given I am running Ubuntu
And I have not yet installed cucumber
When I run "apt-get install ruby ruby1.8-dev rdoc1.8 irb libxml2-dev libxslt1-dev libc6-dev-i386 libopenssl-ruby"
# We install rubygems by hand because the apt version uses strange paths
And I run "wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz"
And I run "tar xvf rubygems-1.3.5.tgz"
And I run "cd rubygems-1.3.5"
And I run "sudo ruby setup.rb"
rsync -avPz /backup/var/lib/mysql/my_database/* /var/lib/mysql/my_database/.
octalStr='377';
num = parseInt(octalStr,8); // num now holds 255 hexStr='7F';
num = parseInt(hexStr,16); // num now holds 127
{-|
Higher-level parser for building ASTs.
> I sang of leaves, of leaves of gold, and leaves of gold there grew:
> Of wind I sang, a wind there came and in the branches blew.
> Beyond the Sun, beyond the Moon, the foam was on the Sea,
> And by the strand of Ilmarin there grew a golden Tree...
-}
basename(dirname($path));