Skip to content

Instantly share code, notes, and snippets.

Avatar

Petr Bechyně tuscanicz

View GitHub Profile
@tuscanicz
tuscanicz / testfile.php
Created Jun 10, 2019
Enum usage example
View testfile.php
<?php
declare(strict_types = 1);
class ClientAppStatusEnum extends \Tuscanicz\Enum
{
public const STATUS_LOCKED = 0;
public const STATUS_ACTIVE = 1;
public const STATUS_TEMPORARY_DISABLED = 2;
View ChannelFactory
<?php
namespace KutnyLib\RabbitMq;
use PhpAmqpLib\Connection\AbstractConnection;
class AmqpChannelFactory
{
private $connection;
@tuscanicz
tuscanicz / bash_profile
Last active Mar 29, 2016
Symfony2/Tracy - bash profile helpers
View bash_profile
# error logs
alias err="cat var/logs/error.log"
alias exc="cat var/logs/exception.log"
alias logs="ls -la var/logs/"
alias lasterr="ls var/logs/exception--20* | tail -1 | xargs open"
exceptiondownloader() {
mkdir ~/Downloads/remote-exceptions
scp collabim-production:/vol/www/serpo/current/var/logs/$1 ~/Downloads/remote-exceptions/
open ~/Downloads/remote-exceptions/$1