Skip to content

Instantly share code, notes, and snippets.

View janmarek's full-sized avatar

Jan Marek janmarek

  • Prague, Czech Republic
View GitHub Profile
@janmarek
janmarek / twitter.css
Last active August 29, 2015 13:56
twitter
.global-nav-inner .container {width: 890px;}
.topbar-tweet-btn button {margin-right: 0 !important}
h1.Icon--bird {display: none !important}
// black header if you want it
.global-nav-inner {background: black;}
.nav>li>a, .nav .active a {color: #EEE}
var React = require('react');
var StoreWatch = require('../mixins/StoreWatch');
/**
* Komponenta factory
*
* @param {IssueActions} issueActions
* @param {IssueStore} issueStore
* @param {Spinner} Spinner
* @param {Errors} Errors
@janmarek
janmarek / FormMacros.php
Created March 28, 2010 21:30
Form macros
<?php
namespace Nette\Templates;
use Nette\Forms\Form;
use Nette\String;
/**
* Form macros
*
@janmarek
janmarek / MultipleFileUpload.php
Created April 23, 2010 15:59
HTML 5 multiple file upload
<?php
/**
* Nette Framework
*
* @copyright Copyright (c) 2004, 2010 David Grudl
* @license http://nettephp.com/license Nette license
* @link http://nettephp.com
* @category Nette
* @package Nette\Forms
@janmarek
janmarek / BaseForm.php
Created September 3, 2010 16:51
Nette datepicker
<?php
class BaseForm extends Nette\Application\AppForm
{
public function addDatePicker($name, $label = NULL, $cols = NULL, $maxLength = NULL)
{
return $this[$name] = new Nette\Forms\DatePicker($label, $cols, $maxLength);
}
}
@janmarek
janmarek / gist:572165
Created September 9, 2010 16:55
Gridito template macros
{gridito usersGrid}
{* top toolbar *}
{gridito.toolbar.button addUser text => "Nový uživatel", icon => "plusthick", plink => "add"}
{* columns *}
{gridito.column username text => "Uživatelské jméno", sortable => true}
{gridito.column name text => "Jméno", sortable => true}
{gridito.column mail text => "E-mail", sortable => true}
{gridito.column allowed text => "Aktivní", sortable => true}
{gridito.column created text => "Datum založení", sortable => true, dateTimeFormat => "j.n.Y"}
@janmarek
janmarek / SeoRouter.php
Created September 12, 2010 16:32
SEO router
<?php
/**
* Seo router
*
* @author Jan Marek
*/
class SeoRouter extends Nette\Object implements Nette\Application\IRouter
{
private $presenter;
@janmarek
janmarek / LessFilter.php
Created November 11, 2010 21:45
LessFilter pro WebLoader
<?php
namespace Webloader;
use Nette\String, lessc;
/**
* Less CSS filter
*
* @author Jan Marek
<?php
// alt-shift zmena klavesnice EN->CS (QWERTY)
// ctrl-space code hints
// nekdo to spustte. nevime co to dela
namespace {
$users = array();
$val = isset($_GET['lorem']) ? intval($_GET['lorem']) : 0;
}
<?php
namespace Symfony\Component\Validator\Constraints;
/**
* @author Roman Sklenář, Jan Marek
* @link https://gist.github.com/664454
*/
class Unique extends \Symfony\Component\Validator\Constraint
{