Skip to content

Instantly share code, notes, and snippets.


Ondřej Mirtes ondrejmirtes

View GitHub Profile
View LongpollingApp.php
use Guzzle\Http\Url;
use Nette\Diagnostics\Debugger;
use Nette\Utils\Strings;
use React\Http\Request;
use React\Http\Response;
use React\SocketClient\ConnectionManager;
use React\Stream\Stream;
ondrejmirtes / FshlHandler.php
Created Apr 20, 2014
FSHL Handler for Texy
View FshlHandler.php
namespace AmphibianDemo\Model;
use FSHL\Highlighter;
use Texy;
use TexyHandlerInvocation;
use TexyHtml;
use TexyModifier;
View HomepagePresenterTest.php
class HomepagePresenterTest extends TestCase
public function testLogout()
$presenter = new HomepagePresenter;
View Apache + PHP na Ubuntu
sudo apt-get install apache2 php5-cgi libapache2-mod-fastcgi
cd /etc/apache2/mods-enabled/
sudo ln -s ../mods-available/actions.load
sudo ln -s ../mods-available/actions.conf
<IfModule mod_fastcgi.c>
AddHandler fastcgi-script .fcgi
View import.php
require_once(__DIR__ . '/dibi.min.php');
'driver' => 'postgre',
'host' => 'localhost',
'dbname' => 'database',
'username' => 'username',
'password' => '***',
View export.php
require_once(__DIR__ . '/dibi.min.php');
'driver' => 'postgre',
'host' => 'localhost',
'dbname' => 'database',
'user' => 'username',
'password' => '***',
View preg_replace_101.php
echo preg_replace(array(
View gist:875109
I am writing my bachelor thesis,
I am working hardly as a developer,
my first CMS was called Nemesis.
it didn't work much better.
I am stuck with the PHP language,
I see ASP as an epic failage,
I tried Java EE last month,
that's when I needed to change my cloth.
ondrejmirtes / ConsoleDebug.php
Created Mar 18, 2011
PHP Nette CLI comfortable debugging
View ConsoleDebug.php
namespace Tools;
use Nette\Debug;
use Nette\Environment;
use Nette\Finder;
* Shows exceptions thrown in CLI mode in browser.
View ModelLoader.php
namespace Proj;
use Nette\Debug,