Skip to content

Instantly share code, notes, and snippets.

View EpocSquadron's full-sized avatar

Daniel S Poulin EpocSquadron

View GitHub Profile
@EpocSquadron
EpocSquadron / Vagrantfile
Created November 21, 2012 21:42
A vagrantfile for a simple LAMP dev vm setup.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# IMPORTANT: Change these.
# What extension to use. Should be initials.dsdev.
server_extension = '.dev'
# What ip you want to reach the vm at.
host_only_ip = "192.168.33.10"
@EpocSquadron
EpocSquadron / .vimrc
Created February 6, 2013 20:33
Simple vimrc that i like.
" .vimrc
" See: http://vimdoc.sourceforge.net/htmldoc/options.html for details
" For multi-byte character support (CJK support, for example):
"set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,gb18030,latin1
set tabstop=4 " Number of spaces that a <Tab> in the file counts for.
set shiftwidth=4 " Number of spaces to use for each step of (auto)indent.
@EpocSquadron
EpocSquadron / config-overrides.php
Created March 28, 2013 16:26
Install scripts for brand new expressionengine builds. Run the pre script, then go through the form at the control panel url, then run the post script. Tested and functional on EE 2.4.0 - 2.5.5 unzipped archives.
$config['index_page'] = '';
$config['tmpl_file_basepath'] = $_SERVER['DOCUMENT_ROOT'].'/../templates/';
$config['third_party_path'] = $_SERVER['DOCUMENT_ROOT'].'/../third_party/';
$config['theme_folder_path'] = $_SERVER['DOCUMENT_ROOT'].'/themes/';
$config['theme_folder_url'] = ((isset(\$_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].'/themes/';
@EpocSquadron
EpocSquadron / new_gist_file
Created April 2, 2013 16:06
Install instructions for PHPCompatibility and PHPCodeSniffer on Ubuntu 12.10
Install dependencies
sudo apt-get install curl unzip
Install PHP Code Sniffer
sudo apt-get install php-codesniffer
Install PHP Compatibility
@EpocSquadron
EpocSquadron / .htaccess
Created April 2, 2013 21:03
ExpressionEngine index.php removing htaccess snippet.
# ##############################################################################
# # EXPRESSIONENGINE REWRITING #
# ##############################################################################
# Place this at the end of the file.
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
@EpocSquadron
EpocSquadron / .gitconfig
Created April 5, 2013 16:10
My global git config
[core]
# Don't track permissions other than standard modes.
filemode = false
# Don't ignore File -> file changes.
ignorecase = false
# Vim is better.
editor = vim
[color]
ui = true
[help]
@EpocSquadron
EpocSquadron / new_gist_file
Created April 8, 2013 20:25
Use php-build and php-version for multiple concurrent versions of php on your dev box.
Install php-build:
sudo apt-get build-dep php5-cli git
git clone git://github.com/CHH/php-build
sudo php-build/install.sh
Install php-version:
git clone https://github.com/wilmoore/php-version.git
sudo ln -s php-version/php-version.sh /usr/local/bin/php-version
@EpocSquadron
EpocSquadron / new_gist_file
Created April 8, 2013 20:26
Failed attempt at automating front-end testing.
## Unicorn
Make sure brew is up to date and install apache-ivy.
brew update
brew install ivy
Create a working directory for compiling and clone from mercurial.
mkdir -p ~/Projects/local
// Regex for finding all exp:channel:entries tags that have no disable attribute set.
\{exp:channel:entries(?!.*disable).*?\}
@EpocSquadron
EpocSquadron / new_gist_file
Created June 17, 2013 19:49
Screencapture on linux
For video only:
ffmpeg -f x11grab -r 25 -s 1440x900 -i :0.0 -vcodec libx264 -preset ultrafast -crf 0 output.mkv
For video and audio: