Skip to content

Instantly share code, notes, and snippets.

View c33s's full-sized avatar

Julian c33s

View GitHub Profile
@c33s
c33s / nginx.conf
Created June 6, 2013 12:37 — forked from leon/nginx.conf
server {
listen 80;
server_name localhost;
root /home/website/web;
rewrite ^/app\.php/?(.*)$ /$1 permanent;
try_files $uri @rewriteapp;
location @rewriteapp {
<?php
namespace Acme\DemoBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Role\SwitchUserRole;
@c33s
c33s / ocp.php
Created November 5, 2013 21:56 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs
server {
# Redirect yoursite.com to www.yoursite.com
server_name yoursite.com;
rewrite ^(.*) http://www.yoursite.com$1 permanent;
}
server {
# Tell nginx to handle requests for the www.yoursite.com domain
server_name www.yoursite.com;
@c33s
c33s / Vagrantfile
Created April 17, 2014 21:59 — forked from leifg/Vagrantfile
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
@c33s
c33s / provision.sh
Last active August 29, 2015 14:00
vagrant - build box
#/bin/bash
# based upon https://mikegriffin.ie/blog/20130418-creating-a-debian-wheezy-base-box-for-vagrant/
aptitude install ssh zerofree sudo
mkdir /home/vagrant/.ssh
cd /home/vagrant/.ssh/
mv vagrant.pub authorized_keys
wget https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub --no-check-certificate
<?php
namespace FashionWeb\DynamicRoutingBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
/**
* This is the class that validates and merges configuration from your app/config files
<?php
namespace Acme\BlogBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\Config\FileLocator;
class AcmeBlogExtension extends Extension
@c33s
c33s / nginx.conf
Created May 16, 2014 11:36 — forked from leon/nginx.conf
server {
listen 80;
server_name localhost;
root /home/website/web;
rewrite ^/app\.php/?(.*)$ /$1 permanent;
try_files $uri @rewriteapp;
location @rewriteapp {
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048