Skip to content

Instantly share code, notes, and snippets.

View dariodiaz's full-sized avatar

Dario Diaz dariodiaz

View GitHub Profile
@dariodiaz
dariodiaz / gulpfile.js
Created January 30, 2014 03:33 — forked from laracasts/gulpfile.js
laravel: gulp config for laravel
var gulp = require('gulp');
var gutil = require('gulp-util');
var notify = require('gulp-notify');
var sass = require('gulp-ruby-sass');
var autoprefix = require('gulp-autoprefixer');
var minifyCSS = require('gulp-minify-css')
var coffee = require('gulp-coffee');
var exec = require('child_process').exec;
var sys = require('sys');
@dariodiaz
dariodiaz / laravel_env
Last active August 29, 2015 13:56 — forked from antonioribeiro/gist:8429426
laravel: environment configuration
Create a .environment file in the root of your application and define your environment and gitignore it:
```
return array(
'LARAVEL_ENV' => 'development',
'POSTGRESQL.HOST' => 'localhost',
'POSTGRESQL.DATABASE_NAME' => 'laraveldatabase',
'POSTGRESQL.DATABASE_USER' => 'laraveluser',
@dariodiaz
dariodiaz / selenium.sh
Created February 10, 2014 13:05 — forked from jakzal/selenium.sh
selenium: start server and nodes config
#!/bin/sh
command=${1:-"help"}
SELENIUM_VERSION="2.39.0"
NODE_OPTIONS="-browser browserName=phantomjs"
download() {
[ -f selenium-server-standalone.jar ] || wget http://selenium.googlecode.com/files/selenium-server-standalone-${SELENIUM_VERSION}.jar -Oselenium-server-standalone.jar
}
@dariodiaz
dariodiaz / CleverLink.php
Created February 17, 2014 20:02
php laravel: macro to change current active link
@dariodiaz
dariodiaz / vhost.py
Created February 19, 2014 16:45 — forked from fideloper/vhost.py
apache: tool to configure virtual hosts easily
#! /usr/bin/python
from sys import argv
from os.path import exists
from os import makedirs
from os import symlink
from os import system
import getopt
#
@dariodiaz
dariodiaz / laravel-security-checker.md
Created March 3, 2014 20:38 — forked from barryvdh/laravel-security-checker.md
php laravel: symfony security checker

Symfony Security Checker in Laravel

Artisan command for Sensiolabs Security Checker

Require this project in your composer.json file

"sensiolabs/security-checker": "dev-master"

Add the following line to app/start/artisan.php:

@dariodiaz
dariodiaz / Excel.php
Created March 3, 2014 20:35 — forked from barryvdh/Excel.php
php laravel: Excel to array class util
<?php
use Illuminate\Support\Contracts\ArrayableInterface;
use Illuminate\Support\Contracts\JsonableInterface;
class Excel implements ArrayableInterface, JsonableInterface{
protected $objPHPExcel;
public function __construct($file){
if($file instanceof \SplFileInfo){
$filename = $file->getRealPath();
@dariodiaz
dariodiaz / xdebug-profiling.ini
Created May 5, 2014 19:52 — forked from dhrrgn/xdebug-profiling.ini
config: Xdebug Profiling
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "/vagrant/cachegrind"
xdebug.profiler_output_name = "callgrind.out.%t.%p"
@dariodiaz
dariodiaz / VagrantXDebug.md
Created May 5, 2014 19:32 — forked from dhrrgn/VagrantXDebug.md
config: Vagrant and PhpStorm debug config

Configure

xdebug.ini

xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
@dariodiaz
dariodiaz / ProjectController.php
Created May 7, 2014 02:39 — forked from lucadegasperi/ProjectController.php
php: Laravel controller cleanup
<?php
class ProjectController extends BaseController implements ProjectCreatorDelegate
{
public function store()
{
$creator = new ProjectCreator($this);
return $creator->create(Input::all());
}