Skip to content

Instantly share code, notes, and snippets.

View dammyammy's full-sized avatar

Dammy O dammyammy

View GitHub Profile
@dammyammy
dammyammy / Install Nodejs
Created March 16, 2014 16:02
Install Nodejs in 1 command
alias installnode="sudo apt-get install python-software-properties python g++ make && sudo add-apt-repository ppa:chris-lea/node.js && sudo apt-get update && sudo apt-get install nodejs"
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "192.168.33.21"
sudo apt-get update
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
sudo apt-get install -y vim curl python-software-properties
sudo add-apt-repository -y ppa:ondrej/php5
sudo apt-get update
sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug
@dammyammy
dammyammy / tip.sh
Created March 26, 2014 19:32 — forked from JeffreyWay/tip.sh
alias gundo='git reset HEAD~ && git clean -df'
var gulp = require('gulp');
var minifycss = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
var notify = require('gulp-notify');
var sass = require('gulp-ruby-sass');
gulp.task('css', function() {
return gulp.src('sass/main.sass')
.pipe(sass({ style: 'compressed' }))
.pipe(autoprefixer('last 15 version'))
var gulp = require('gulp');
var minifycss = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
var notify = require('gulp-notify');
var sass = require('gulp-ruby-sass');
gulp.task('css', function() {
return gulp.src('sass/main.sass')
.pipe(sass({ style: 'compressed' }))
.pipe(autoprefixer('last 15 version'))
@dammyammy
dammyammy / DCMA_Notice
Last active August 29, 2015 14:15 — forked from kezadias/gist:4cca9cd424c58d515036
DCMA Notice Template
I am the copyright owner of the content, "{{ $infringing_title }}" being infringed at:
{{ $infringing_link }}
You may find the original content at:
{{ $original_link }}
{{ $original_description }}
<?php
namespace Dammyammy;
use SessionHandler;
class SecureSessionHandler extends SessionHandler {
protected $key, $name, $cookie;
@dammyammy
dammyammy / Session Usage
Created March 12, 2015 20:55
Usage Of Session Handler Class
$session = new SecureSessionHandler('cheese');
ini_set('session.save_handler', 'files');
session_set_save_handler($session, true);
session_save_path(__DIR__ . '/sessions');
$session->start();
if ( ! $session->isValid(5)) {
@dammyammy
dammyammy / gist:ba93c861aa8255149760
Created March 19, 2015 07:48
FFMPEG for Manipulating Video And Audio
http://www.thingsiuse.org/2014/06/building-ffmpeg-for-h264-and-aac.html