Skip to content

Instantly share code, notes, and snippets.

@sameg14
sameg14 / gist:10533b9cec72ccbd3a20
Last active August 29, 2015 14:20
Production app.php for Symfony2 using ApcClassLoader
<?php
use Symfony\Component\Debug\Debug;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\ClassLoader\ApcClassLoader;
$loader = require(__DIR__ . '/../app/bootstrap.php.cache');
require(__DIR__ . '/../app/AppKernel.php');
require(__DIR__ . '/../app/AppCache.php');
@sameg14
sameg14 / auth.php
Created March 4, 2015 22:24
Oauth3
<?php
/**
* Get access token via OAuth2 three legged dance
* @see https://sagedocs.wholelabs.com/wiki/index.php?title=Sage-api/v2/authorize
* @throws Exception
* @return string
* @todo: Doc #experiment
*/
protected function getAccessToken()
@sameg14
sameg14 / VagrantFile
Last active August 29, 2015 14:14
Windows - ACA generic LAMP VM
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.hostname = "aca.vm"
config.vm.box = "https://s3-us-west-2.amazonaws.com/vagrantvmboxes/aca-generic-lamp-packaged.box"
config.vm.network "private_network", ip: "10.10.10.60"
config.vm.synced_folder "c:\\htdocs", "/var/www"
config.vm.provider "virtualbox" do |vb|
vb.gui = false
@sameg14
sameg14 / VagrantFile
Last active August 29, 2015 14:14
Mac - ACA generic LAMP VM VagrantFile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.hostname = "aca.vm"
config.vm.box = "https://s3-us-west-2.amazonaws.com/vagrantvmboxes/aca-generic-lamp-packaged.box"
config.vm.network "private_network", ip: "10.10.10.60"
config.vm.synced_folder "~/Desktop/htdocs", "/var/www"
config.vm.provider "virtualbox" do |vb|
vb.gui = false
@sameg14
sameg14 / gist:bbf762e47da1df85ff52
Last active August 29, 2015 14:12
Platform QA Deploy - Ansible Playbook
---
- hosts : platform-qa-server
su : yes
vars :
hipchat_rooms:
- { token: "a2a1d9143d45feac80d33bf5246247", room: "504774", name: "LIN Digital Engineering" }
pre_tasks:
- name : HipChat - Attempting Deploy...
@sameg14
sameg14 / gist:8994627
Created February 14, 2014 02:11
varnish joomla vcl for joomla support for large post files
# This is a basic VCL configuration file for varnish. See the vcl(7)
# man page for details on VCL syntax and semantics.
#
# Default backend definition. Set this to point to your content
# server.
#
backend default {
.host = "127.0.0.1";
.port = "8000";
}
@sameg14
sameg14 / gist:8969563
Created February 13, 2014 04:05
perfect varnish caching for joomla
# This is a basic VCL configuration file for varnish. See the vcl(7)
# man page for details on VCL syntax and semantics.
#
# Default backend definition. Set this to point to your content
# server.
#
backend default {
.host = "127.0.0.1";
.port = "8000";
}