Configs exist in three levels:
- local
- dev | stg | prod
- default (no environment)
There are three types of configs:
function hasClass(ele,cls) { | |
return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)')); | |
} | |
function addClass(ele,cls) { | |
if (!this.hasClass(ele,cls)) | |
ele.className += " "+cls; | |
} | |
function removeClass(ele,cls) { |
function anchorEventer(baseUrl) | |
{ | |
if (baseUrl) { | |
anchorEventer.oldUrl = baseUrl; | |
} | |
if (!anchorEventer.oldUrl) { | |
anchorEventer.oldUrl = document.location.href; | |
} | |
return { |
<?php | |
namespace MyCompany\Bundle\MyBundle\Command; | |
use Symfony\Bundle\FrameworkBundle\Command\Command; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\HttpFoundation\Request; |
<?php | |
namespace Ololo\Bundle\UsersBundle\Service; | |
use Doctrine\ORM\EntityManager; | |
use Ololo\Bundle\UsersBundle\Entity\User; | |
use Ololo\Bundle\UsersBundle\Entity\Friendship; | |
use Ololo\Bundle\UsersBundle\Event\FriendshipSuccessEvent; |
<?php | |
$userVariable = array( | |
'max_riders_on_trip' => 50, | |
'has_bycicle' => 1, | |
'has_rollers' => 0, | |
'has_snowboard' => 1, | |
'invite_users' => 27, | |
); |
<?php | |
namespace Ololo\Bundle\BadgesBundle\Entity; | |
use Doctrine\ORM\EntityRepository; | |
class BadgeRepository extends EntityRepository | |
{ | |
public function getInfoAboutBadge($id, $locale) | |
{ |
#!/bin/sh | |
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh | |
set -e | |
NAME="brouzie-php-53" | |
RUN_AS_USER=brouzie | |
PHP_FCGI_CHILDREN=3 | |
PHP_FCGI_MAX_REQUESTS=200 |
<?php | |
class Bijective | |
{ | |
public $dictionary = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | |
public function __construct() | |
{ | |
$this->dictionary = str_split($this->dictionary); | |
} |
<?php | |
namespace Myako\Geographical\Functions; | |
use Doctrine\ORM\Query\AST\Functions\FunctionNode; | |
use Doctrine\ORM\Query\Lexer; | |
/** | |
* "DISTANCE" "(" LatitudeFrom, LongitudetFrom, LatitudeTo, LongitudeTo ")" | |
* |