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 | |
$log = __DIR__ . '/api.log'; | |
if ('POST' == $_SERVER['REQUEST_METHOD']) { | |
$payload = json_decode(file_get_contents('php://input'), true) ?: $_POST; | |
file_put_contents( | |
$log, | |
sprintf( | |
"[%s] (%s - %s) %s\n", | |
(new \DateTime())->format('Y-m-d H:i:s'), |
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 | |
/* $Id$ */ | |
set_include_path(get_include_path() . ':' . __DIR__ . '/../lib'); | |
include 'SabreAMF/Client.php'; //Include the client scripts | |
spl_autoload_register(function($classname) { | |
$filename = str_replace(array('_', '\\'), DIRECTORY_SEPARATOR, $classname) . '.php'; | |
include $filename; | |
}); |
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 | |
exec < /dev/tty | |
phpunit | |
rc=$? | |
if [[ $rc != 0 ]] ; then | |
echo -n "It looks like some of your tests failed. " | |
exit $rc; | |
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 generated by symfony framework (v.1.2) with Doctrine 1.0 | |
* after switching to doctrine 1.1 objects saved in admin generated modules won't include many-to-many relations | |
* the solution is to overload doSave method and swap two lines below | |
* | |
* let me know if you have better idea :-) twitter.com/sznapka | |
*/ | |
class BasePackageForm extends BaseFormDoctrine |
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
class A | |
{ | |
int i = 1; | |
public int print() | |
{ | |
System.out.println(" z klasy A "); | |
return i; | |
} | |
} | |
public class B extends A |
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 dummyActions extends sfActions | |
{ | |
/** | |
* remember: never use readfile function here! it sends headers to browser, so those sent by you are useles | |
* also don't echo file and then return sfView::NONE - echoing should be done in views! | |
* | |
* this method is environment independent, you can use it in _prod, _dev etc, | |
* alsoWeb Debug Toolbar can be turned on | |
*/ |
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 | |
/** | |
* Losowanie liczby w zależności od aktualnego dnia | |
*/ | |
$days = array( | |
0 => array(11, 88), //niedziela | |
1 => array(5, 2), //poniedzialek | |
2 => array(3, 7), //wtorek | |
3 => array(2, 9), //sroda | |
4 => array(55, 22), //czwartek |
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
01cars_and_users.yml | |
02fuels.yml | |
03prices.yml |
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
test: | |
doctrine: | |
class: sfDoctrineDatabase | |
param: | |
dsn: 'sqlite::memory:' |
OlderNewer