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
<? | |
foreach(range(1, 10) as $i) echo $i * 2 . " "; |
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
<html> | |
<head> | |
<style> | |
.images_roll_hide { | |
display: none; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="images_roll" class="catch_page_block"> |
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
[tvl@novo /var/www/html/leeshoek.home.ctors.net/Symfony] | |
$ app/console behat -e=test | |
Functionaliteit: Gebruiker moet gebruikers kunnen verwijderen | |
Om gebruikers te kunnen verwijderen | |
Met een beheerder | |
Moet ik een verwijder knop kunnen gebruiken | |
Scenario: Roep knop op als leerkracht # src/Ctors/ReadingCornerBundle/Features/User/remove.feature:7 | |
Gegeven ik ben ingelogd als "leerkracht" # Ctors\ReadingCornerBundle\Features\Context\ReadingCornerContext::ikBenIngelogdAls() | |
Als ik naar "/user/1/remove" ga # Ctors\ReadingCornerBundle\Features\Context\ReadingCornerContext::visit() |
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
<?php | |
function jpg ($file) { return substr($file, -4) == '.jpg'; } | |
$imgs = array_filter(scandir('.'), 'jpg'); | |
$max = count($imgs); | |
shuffle($imgs); | |
?> | |
<html> | |
<body> | |
<img src="<?php echo $imgs[0]; ?>" id="cur_img" onclick="next();" height="100%" /> | |
<img src="<?php echo $imgs[1]; ?>" id="nxt_img" onclick="next();" style="display: none;" /> |
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
<?php | |
// (c) Tom Van Looy <tom@ctors.net> https://ctors.net/isc_license.txt | |
// Alle feestdagen kunnen berekend worden, de berekende zijn allemaal | |
// afhankelijk van pasen. PHP heeft een functie easter_date(). | |
// Makkie dus. Hoe easter_date() zelf werkt kan je hier raadplegen: | |
// https://github.com/php/php-src/blob/master/ext/calendar/easter.c | |
// Geen parameter? Doen we gewoon dit jaar toch. |
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
#!/bin/bash | |
while [ TRUE ]; do | |
detect=$(netstat -an | grep `dig +short www.facebook.com` | grep ESTA | wc -l) | |
if [ $detect -ne 0 ]; then | |
osascript -e "set Volume 7" | |
say -v Zarvox "computer says no, `whoami`" | |
killall Safari | |
sleep 10 | |
fi |
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
<?php | |
class XmlSerializer { | |
private static $xmlns = 'www.rentplus.be/webservices/'; | |
public static function toXml($obj) { | |
$class = get_class($obj); | |
$xml = '<?xml version="1.0" standalone="yes"?>' . | |
'<ds' . $class . ' xmlns="' . self::$xmlns . $class . '.xsd">' . | |
self::serialize($obj) . |
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
[tvl@orion ~] | |
$ uname -a | |
Linux orion 3.2.0-31-generic #50-Ubuntu SMP Fri Sep 7 16:16:45 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux | |
[tvl@orion ~] | |
$ lsb_release -a | |
No LSB modules are available. | |
Distributor ID: Ubuntu | |
Description: Ubuntu 12.04.1 LTS | |
Release: 12.04 |
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
#!/bin/bash | |
if [ ! -f "$1" ]; then | |
echo "Usage: $0 filename.txt" | |
exit -1 | |
fi | |
filename=$1 | |
months="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec" | |
linenr=0 |
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
#compdef phpunit.phar | |
_arguments -s -w \ | |
'--list-groups[List available test groups]' \ | |
'--tap[Report test execution progress in TAP format]' \ | |
'--testdox[Report test execution progress in TestDox format]' \ | |
'--colors[Use colors in output]' \ | |
'--stderr[Write to STDERR instead of STDOUT]' \ | |
'--stop-on-error[Stop execution upon first error]' \ | |
'--stop-on-failure[Stop execution upon first error or failure]' \ |
OlderNewer