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
// Plausible code
[] == 0 // true
+[] === 0 // true, wait whu?
++[] === 1 // sorta, though this is invalid js syntax, so...
// Somewhat unlikely and, lets be honest, regrettable code:
[[]][0] === []
++[[]][0] === 1
++[[]][+[]] === 1 // yay! wtf!
// Boolean logic paradox via @amattie!
"0" && {} // true
0 && {} // false, ok...fair enough
0 == "0" // true, wtf!
plugin.meta {
robots = INDEX,FOLLOW
author = typo3, astrid, das oe, viele Gruesse und eine schoenen Tag!
language = de
revisit = 5 Days
}
basename(dirname($path));
{-|
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...
-}
octalStr='377';
num = parseInt(octalStr,8); // num now holds 255 hexStr='7F';
num = parseInt(hexStr,16); // num now holds 127
rsync -avPz /backup/var/lib/mysql/my_database/* /var/lib/mysql/my_database/.
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"
import XMonad
main = xmonad defaultConfig
{ modMask = mod4Mask -- Use Super instead of Alt
, terminal = "urxvt"
-- more changes
}
[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