Skip to content

Instantly share code, notes, and snippets.

View fprochazka's full-sized avatar
🏠
Working from home

Filip Procházka fprochazka

🏠
Working from home
View GitHub Profile
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
{
"methodCalls": [
{
"class": "\\Mockery",
"method": "mock",
"position": 0,
"mask": "%s|\\Mockery\\MockInterface"
},
{
"class": "\\Nette\\DI\\Container",
@fprochazka
fprochazka / QueryObject.php
Created May 21, 2015 14:25
QueryObject class template for PhpStorm
<?php
namespace ${NAMESPACE};
use Nette;
use Kdyby;
use Kdyby\Doctrine\QueryBuilder;
use Kdyby\Persistence\Queryable;
<?php
namespace Rohlikcz\RabbitMq;
use Rohlikcz\Identified;
use Rohlikcz\InvalidArgumentException;
use Rohlikcz\InvalidStateException;
use Doctrine\Common\Util\ClassUtils;
use Kdyby;
use Nette;
@fprochazka
fprochazka / gist:406112
Created May 19, 2010 09:10
TimerPanel
<?php
class TimerPanel extends Object implements IDebugPanel
{
const PRODLEVA = 1800;
const PROTOKOL = 'file'; // safe
const LOG_FILE = "/temp/timerPanel.log";
<?php
class BaseModel
{
static $su;
public function isSU()
{
if( empty(self::$su) ){
<?php
class CSVFile extends ArrayList
{
/*
* Is first line list of titles?
*/
var $titles = True;
var $separator = ',';
<?php
namespace cURL;
use Nette;
class CurlResponse extends Nette\Object {}
<?php
class HtmlButcher implements \ArrayAccess, \Iterator
{
// ....
final public function offsetGet($index)
{
if( substr_count($index, ':') === 1 ){
<?php
public function handleGenerujSestavu($rok, $mesic)
{
require_once(LIBS_DIR . '/tcpdf/config/lang/eng.php');
$nadpis = "Rekapitulace Zelené Nafty ".$this->getMonth((int)$mesic)." {$rok}";
//$sestava = new tcPdf('P', 'mm', 'A4', true, 'UTF-8', false);
$sestava = new tcPdf(PDF_PAGE_ORIENTATION, PDF_UNIT, 'A4', true);