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 | |
@mkdir('/tmp/debugging', 02755, true); | |
file_put_contents('/tmp/debugging/event.log', print_r(array($_SERVER, $_POST, $_GET, $_SESSION), true)); |
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 | |
namespace UserModule; | |
use FixFacebook; | |
class FacebookPresenter extends AbstractSignPresenter | |
{ | |
public function actionLogin() |
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 | |
$documentRootStyles = realpath(__DIR__ . '/../document_root/css'); | |
$appDir = realpath(__DIR__ . '/../app'); | |
foreach (new DirectoryIterator($appDir) as $file) { | |
if (!$file->isDir() || !preg_match('/.+Module/', $file->getFilename())) { | |
continue; | |
} | |
$module = lcfirst(substr($file->getFilename(), 0, -6)); | |
$stylesDir = $appDir . '/' . $file->getFilename() . '/styles'; |
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 | |
namespace ApiModule; | |
use Nette, | |
Nette\Application\Request; | |
class Router extends Nette\Object implements Nette\Application\IRouter | |
{ |
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
location ~ \.php { | |
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param REQUEST_METHOD $request_method; | |
fastcgi_param CONTENT_TYPE $content_type; | |
fastcgi_param CONTENT_LENGTH $content_length; | |
fastcgi_pass_header Authorization; | |
fastcgi_intercept_errors off; | |
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
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
$stopAt = 15; // 4h 33m 4s | |
$now = new DateTime; | |
?><table><?php | |
foreach (range(1, 15) as $i) { | |
?><tr><td><?php | |
echo $i | |
?><td><?php | |
$after = clone $now; | |
$tries = min($i, $stopAt); | |
$seconds = (int) ceil( (pow(2, $tries) - 1) / 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
<?php | |
$root = ltrim(getcwd(), DIRECTORY_SEPARATOR); | |
foreach (scandir($root) as $file) { | |
if (preg_match('/^(?P<presenter>[^.]+)\.(?P<action>[^.]+)\.(latte|phtml)$/', $file, $matches)) { | |
$dir = $root . DIRECTORY_SEPARATOR . $matches['presenter']; | |
$filename = $dir . DIRECTORY_SEPARATOR . $matches['action'] . '.latte'; | |
if (!is_dir($dir)) { | |
mkdir($dir); | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Text.RegularExpressions; | |
using System.Runtime.Serialization; | |
namespace net.mishak.utils | |
{ |
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
var blacklist = ['mishak','mullick']; | |
setInterval(function () { | |
$('#chatcontent > div').each(function(i,v){if(-1!=$.inArray($('span', v).text(), blacklist))$(v).hide();}); | |
}, 1000); |
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 | |
namespace ApiModule; | |
use Api\Authenticator, | |
Model\Rest, | |
Model\Action, | |
Mishak\Application\Response\JsonResponse, | |
Nette, | |
Nette\Application\UI\Presenter, |
OlderNewer