Skip to content

Instantly share code, notes, and snippets.

View ajeliuc's full-sized avatar
💭
This account is kept to avoid fishing. Actual one is @a2xchip

Jeliuc Alexandr ajeliuc

💭
This account is kept to avoid fishing. Actual one is @a2xchip
View GitHub Profile
<?php
require_once dirname(__DIR__).'/../../../../app/AppKernel.php';
/**
* Test case class helpful with Entity tests requiring the database interaction.
* For regular entity tests it's better to extend standard \PHPUnit_Framework_TestCase instead.
*/
abstract class KernelAwareTest extends \PHPUnit_Framework_TestCase
{
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://npmjs.org/install.sh | sh
@ajeliuc
ajeliuc / app.js
Created April 27, 2013 01:23 — forked from joshkurz/app.js
var demoApp = angular.module('demoApp', ['ngResource'], function($locationProvider) {
$locationProvider.hashPrefix('');
});
function MainCtrl($scope, Serv) {
$scope.selectedItem = {
value: 0,
label: ''
};
$scope.Wrapper = Serv;
@ajeliuc
ajeliuc / add and remove www
Last active December 16, 2015 08:58
php5fpm nginx (socket, silex version)
# Add a www with this block
server {
listen 80;
server_name bedom.com;
rewrite ^(.*)$ $scheme://www.bedom.com$1;
}
# Remove a www with this block instead
server {
listen 80;
@ajeliuc
ajeliuc / AppKernel.php
Created December 17, 2012 21:07
kernel env test and dev
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),