Skip to content

Instantly share code, notes, and snippets.

View kix's full-sized avatar

Stepan Anchugov kix

View GitHub Profile
{% extends "form_div_layout.html.twig" %}
{# Widgets #}
{% block form_widget_simple %}
{% spaceless %}
{% set type = type|default('text') %}
{% if attr.class is defined and not "form-control" in attr.class %}
{% set attr = attr|merge({class: attr.class ~ ' form-control'}) %}
{% elseif attr.class is not defined %}

Разграничение прав

Реализация

Реализация VoterInterface:

class AccessVoter implements VoterInterface
{
@kix
kix / 01.configure
Last active August 29, 2015 13:57
PHP 5.5 homebrew build log
configure: WARNING: unrecognized options: --enable-fastcgi
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/local/Library/ENV/4.3/sed
checking build system type... x86_64-apple-darwin13.1.0
checking host system type... x86_64-apple-darwin13.1.0
checking target system type... x86_64-apple-darwin13.1.0
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
brew install hhvm --HEAD 2014-04-01 11:27:38
==> Installing dependencies for hhvm: cmake, mcrypt, gflags, glog, oniguruma, libelf, gd, imagemagick, memcached, libmemcached, tbb, boostfb, binutilsfb, ncurses, curl, imap-uw, gmp4, mpfr2, libmpc08, isl011, cloog018, gcc48, jemal
==> Installing hhvm dependency: cmake
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/cmake-2.8.12.2.mavericks.bottle.2.tar.gz
######################################################################## 100.0%
==> Pouring cmake-2.8.12.2.mavericks.bottle.2.tar.gz
🍺 /usr/local/Cellar/cmake/2.8.12.2: 701 files, 36M
==> Installing hhvm dependency: mcrypt
==> Downloading https://downloads.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
######################################################################## 100.0%
<?php
abstract class AbstractRestController
{
/**
* @var \Symfony\Component\Form\FormFactoryInterface
*/
protected $formFactory;
@kix
kix / ToxID.md
Last active August 29, 2015 14:04
My Tox ID

signed up on a bad client, don't use: 4B35837458E0FDE5B6DAE9CB39D852C0D3E56762469763070A94F54D996D146C15FE7480DBFC

new: (on Mac use Poison, it doesn't suck) 3453496CBF60CBB9A64D5DCB1AF49DBD160BFD691B3DA5C2389D8B81CB7DC3441A838A3D0B2F

@kix
kix / README.md
Last active August 29, 2015 14:07 — forked from igorw/README.md

kayladnls/machine-doge

A simple machine doge library.

Example

Here is an example of how you can instruct the machine to doge the answer:

<?php
@kix
kix / server.sh
Last active August 29, 2015 14:07
server.sh
alias server='open http://quickserve.local:8000 && sleep 1 && php -S quickserve.local:8000 -t ./'
@kix
kix / popover_region.coffee
Created October 23, 2014 06:46
Marionette 1.8 + Bootstrap 3 PopoverRegion
define ['app', 'backbone', 'marionette'], (Backbone) ->
App.module "Regions", (Regions, App, Backbone, Marionette, $, _) ->
class Regions.PopoverRegion extends Backbone.Marionette.Region
# options are:
# - target: element to bind popover display to
# - params: parameters passed to Bootstrap's $(el).popover() method
constructor: (options = {}) ->
unless options.target?
throw new Error('You need to specify a target for the popover region')
@kix
kix / rss.xml
Created November 18, 2014 08:04
<!-- If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/ -->
<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:media='http://search.yahoo.com/mrss/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
<title>Alexander Yampolsky</title>
<link>http://ayampolsky.livejournal.com/</link>
<description>Alexander Yampolsky - LiveJournal.com</description>
<lastBuildDate>Tue, 18 Nov 2014 07:05:36 GMT</lastBuildDate>
<generator>LiveJournal / LiveJournal.com</generator>
<lj:journal>ayampolsky</lj:journal>
<lj:journalid>71497728</lj:journalid>