Skip to content

Instantly share code, notes, and snippets.

@lrusev
lrusev / RoboFile.php
Last active February 2, 2016 13:49
Codeception robo file
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* @see http://robo.li/
*/
class RoboFile extends \Robo\Tasks
{
const TITLE_PASSED = 'Test Passed';
@lrusev
lrusev / fiddle
Last active August 29, 2015 14:20
yeoman playground scaffolding
#!/bin/bash
EXMSG="Detected that project already exists, please use another one."
PROJEXMSH="Detected that project already exists"
GENERATOR="playground"
if ! which nodejs >/dev/null; then
echo "Install nodejs"
sudo apt-get update
sudo apt-get install nodejs
fi
//you may have some more configs here...
providers:
user:
entity: { class: MyAppBundle:User, property: loginEmail }
admin:
entity: { class: MyAppBundle:Admin, property: username }
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
Ext.define('DRSI.datasets.AddDocumentsForm', {
extend: 'Ext.window.Window',
title: 'Add Documents',
modal: true,
closable: false,
width: 400,
items: [{
id: 'DocumentDropZone',
xtype: 'container',
@lrusev
lrusev / update.sh
Created January 16, 2015 11:39
Symfony2 update project shell script
#shouldn't be used on production, just for dev
svn up composer.json
php composer.phar update
svn up
bin/console doctrine:schema:update --force
bin/console doctrine:fixture:load -e=prod
bin/console assets:install public_html --symlink
rm -rf var/cache/* public_html/assetic
bin/console fos:js-routing:dump --target=public_html/js/routes.js
bin/console assetic:dump public_html/
@lrusev
lrusev / install.sh
Created January 16, 2015 11:37
Symfony2 Install project shell script
#shouldn't be used on production, just for dev
curl -sS https://getcomposer.org/installer | php
php composer.phar install
bin/console doctrine:database:create
bin/console doctrine:schema:update --force
bin/console doctrine:fixture:load -e=prod
bin/console assets:install public_html --symlink
bin/console fos:js-routing:dump --target=public_html/js/routes.js
bin/console assetic:dump public_html/
bin/console cache:clear -e=prod
@lrusev
lrusev / phpunit.xml
Created June 10, 2014 07:28
tdd phpunit config
<phpunit bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticeToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
<testsuites>
@lrusev
lrusev / _mixins.scss
Created May 22, 2014 10:10
sass table columng width generator
@mixin cols-width($sizes, $unit:"%") {
@if type-of($sizes) != list {
@if strip-unit($sizes) != $sizes {
$unit: unit($sizes);
}
&.width-#{strip-unit($sizes)} th:nth-child(1),
&.width-#{strip-unit($sizes)} td:nth-child(1) {
width: #{strip-unit($sizes)}#{$unit}
}