Skip to content

Instantly share code, notes, and snippets.

@gravitano
gravitano / vim-janus-ubuntu.vim-after
Last active January 4, 2016 15:59
Vim Janus Ubuntu
set nocompatible 'Disable vim-compability
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L "Removes left hand scroll bar
set linespace=15
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 sys = require('sys');
var exec = require('child_process').exec;
var hold = false;
gulp.task('phpunit', function() {
exec('phpunit', function(error, stdout) {
sys.puts(stdout);
hold = false;
});
@gravitano
gravitano / setup.sh
Created February 8, 2014 10:27
Setup LAMP on Ubuntu
sudo apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils apache2-suexec libexpat1 ssl-cert
sudo apt-get install libapache2-mod-php5 libapache2-mod-ruby libapache2-mod-python php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
sudo apt-get install mysql-server mysql-client libmysqlclient15-dev
sudo apt-get install phpmyadmin
#enable mod rewrite
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
<?php
$input = Input::all();
$rules = array(
'password' => 'required|min:6|max:20|confirmed',
'password_confirmation' => 'required|min:6|max:20',
'current_password' => 'required'
);
$validation = Validator::make($input, $rules);
if ($validation->passes())
<?php
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
|--------------------------------------------------------------------------
|
| Laravel takes a dead simple approach to your application environments
| so you can just specify a machine name for the host that matches a
| given environment, then we will automatically detect it for you.
@gravitano
gravitano / .vimrc
Created March 17, 2014 15:42 — forked from JeffreyWay/.vimrc
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@gravitano
gravitano / .vimrc
Last active August 29, 2015 13:57
My ~/.vimrc file :D
execute pathogen#infect()
syntax on
filetype plugin indent on
" CtrlP Stuff
set runtimepath^=~/.vim/bundle/ctrlp.vim
set encoding=utf-8
let g:ctrl_max_height=20
set wildignore+=*.pyc
set wildignore+=_build/*
@gravitano
gravitano / install.sh
Last active August 29, 2015 13:57 — forked from JeffreyWay/install.sh
LAMP on Ubuntu 14.04
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 ppa:ondrej/php5-5.6
sudo add-apt-repository ppa:git-core/ppa
@gravitano
gravitano / BaseController.php
Created March 27, 2014 14:00
Simple trick for your BaseController.php
<?php
class BaseController extends Controller {
/**
* Setup the layout used by the controller.
*
* @return void
*/
protected function setupLayout()