Skip to content

Instantly share code, notes, and snippets.

#https://gorails.com/setup/ubuntu/14.04
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default
{# Widgets #}
{% block form_widget %}
{% spaceless %}
{% if compound %}
{{ block('form_widget_compound') }}
{% else %}
{{ block('form_widget_simple') }}
{% endif %}
{% endspaceless %}
@ezonno
ezonno / ProfileManager.php
Created October 25, 2012 05:46
Test using partial mock with Mockery and constrictor is not being called
<?php
namespace ProfileBundle\Manager;
use ProfileBundle\Entity\Profile;
use ProfileBundle\Entity\ProfileConsent;
use ProfileBundle\Exception\NoProfileInSessionException;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session;
@ezonno
ezonno / Database.php
Created October 25, 2012 05:35 — forked from simonjodet/Database.php
Mockery - Partially mocking class's own methods
<?php
class Database
{
/**
* @var \Doctrine\DBAL\Connection
*/
private $conn;
public function __construct(\Silex\Application $app)
location = /favicon.ico {
log_not_found off;
access_log off;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
@ezonno
ezonno / app.nginx.conf
Created April 3, 2012 14:35 — forked from chanmix51/app.nginx.conf
nginx vhost conf silex & symfony
server {
listen 80;
server_name server.mydomain.net
root /var/www/app/web;
index index.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;