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 / gulpfile.js
Created January 23, 2014 00:37 — forked from BradEstey/gulpfile.js
config php gulp: gulp config for phpunit tests
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;
});
@dariodiaz
dariodiaz / gulpfile.js
Created January 23, 2014 00:34 — forked from JeffreyWay/gulpfile.js
config: build task runner
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'))
@dariodiaz
dariodiaz / 0) ABC for Sendy with Laravel
Created January 21, 2014 17:17 — forked from jasonlemay/0) ABC for Sendy with Laravel
laravel: send emails with sendy
Setting up Sendy with Laravel
(there might be bugs, I striped out some parts of my code because what I have is more complicated then that, so, sorry if it's broken!)
--
I would recommand creating a database for Sendy only.
Add Sendy's database into your database.php (1)
Create the Campaign model (2), and specify that you want to use Sendy's database (Campaigns are the only thing we really need to create, other things like creating lists can be done through Sendy interface, and there is a PHP library to add subscribers)
Now, it's time to install Sendy, usually somewhere like yourapp.com/sendy or yourapp.com/newsletter
@dariodiaz
dariodiaz / virtualbox-setup
Created January 11, 2014 15:58
laravel: virtualbox configuration from taylor otwell
#!/usr/bin/env bash
# Upgrade Base Packages
sudo apt-get update
sudo apt-get upgrade -y
# Install Web Packages
sudo apt-get install -y build-essential dkms re2c apache2 php5 php5-dev php-pear php5-xdebug php5-apcu php5-json php5-sqlite \
php5-mysql php5-pgsql php5-gd curl php5-curl memcached php5-memcached libmcrypt4 php5-mcrypt postgresql redis-server beanstalkd \
openssh-server git vim python2.7-dev
@dariodiaz
dariodiaz / BlogController.php
Created November 22, 2013 11:47 — forked from tobysteward/BlogController.php
php: Pagination with ajax in laravel
<?php
class BlogController extends Controller
{
/**
* Posts
*
* @return void
*/
public function showPosts()
@dariodiaz
dariodiaz / gist:6545868
Created September 13, 2013 01:18
HTML: Starting template
<html>
<head>
<title></title>
<link rel="stylesheet" href="">
</head>
<body>
</body>
</html>
@dariodiaz
dariodiaz / vhost
Created August 26, 2013 11:27 — forked from gistwebdev/vhost
conf: create apache vhosts
#!/bin/bash
#
# Display usage info
vhost-usage() {
cat <<"USAGE"
Usage: vhost [OPTIONS] <name>
-h|--help this screen
-pub to create the webhost root in ~/www/name/public/
-url to specify a local address, default is http://name.local
@dariodiaz
dariodiaz / git_undo.sh
Last active December 21, 2015 03:29 — forked from JeffreyWay/tip.sh
git: undo everything since your last commit, including the addition of new files
alias gundo='git reset HEAD~ && git clean -df'
@dariodiaz
dariodiaz / composer.json
Created August 10, 2013 18:25 — forked from johnpbloch/composer.json
PHP: phpunit global installation
{
"name": "phpunit",
"description": "PHPUnit Composer Package",
"require": {
"phpunit/phpunit": "3.7.*"
},
"config": {
"bin-dir": "/usr/local/bin/"
}
}