Instantly share code, notes, and snippets.

View post-receive
#!/bin/bash
TARGET="/path/to/root"
GIT_DIR="/path/to/vcs/project.git"
PROD_BRANCH="master"
DEV_BRANCH="development"
while read oldrev newrev ref
do
if [[ $ref = refs/heads/$PROD_BRANCH ]];
then
View Event.php
class Event{
protected $name;
protected $callback;
public function __construct($name, Callable $callable){
$this->name = $name;
}
public function fire(array $args = null){
return call_user_func_array($this->callback, $args);
}
}
View PartialBlurFilter.php
<?php
namespace Maiorano\Services\Filters;
use Intervention\Image\Filters\FilterInterface;
use Intervention\Image\Image;
class PartialBlurFilter implements FilterInterface
{
private $width;
View ffmpeg.sh
#!/bin/sh
rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
yum -y update
yum -y install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel freetype-devel speex-devel
#YASM
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
View nginx-restart.bat
@ECHO OFF
call nginx-stop.bat
call nginx-start.bat
EXIT /b