Skip to content

Instantly share code, notes, and snippets.

View nexik's full-sized avatar

Tomasz Ślązok nexik

View GitHub Profile
<?php
namespace App;
use Nest\Application\Cli as Application;
class Cli extends Application
{
public function configure()
{
$this->add(new Task\I18n\SynchronizeCommand($this->di->get('config')));
@nexik
nexik / Uniqueness.php
Created January 15, 2014 21:20
Phalcon\Validation\Validator\Db\Uniqueness
<?php
namespace Phalcon\Validation\Validator\Db;
use Phalcon\Validation\Validator;
use Phalcon\Validation\ValidatorInterface;
use Phalcon\Validation\Message;
use Phalcon\Db\Adapter\Pdo as DbConnection;
use Phalcon\Validation\Exception as ValidationException;
class Uniqueness extends Validator implements ValidatorInterface
<?php
// execute raw SQL
Doctrine_Manager::connection()->exec('SQL');
@nexik
nexik / gist:3038632
Created July 3, 2012 09:01
Sublime Text 2 Config
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"detect_indentation": true,
"detect_slow_plugins": false,
"font_face": "consolas",
"font_size": 10,
"highlight_line": true,
"ignored_packages":
[
"Vintage",
@nexik
nexik / SVN:commands
Created March 16, 2012 13:29
SVN:commands
# add all new files to svn repo
svn status | grep ? | xargs svn add
# add to remove from svn (in next commit) all localy deleted files
svn status | grep \! | sed 's/\!//' | xargs svn delete
# after manually resolving conflict
svn resolve PATH --accept working
# ssh checkout
@nexik
nexik / 1. Symfony
Created March 13, 2012 12:25
Symfony helpful snippets
_