Skip to content

Instantly share code, notes, and snippets.

View iolson's full-sized avatar

Ian Olson iolson

  • Grubhub
  • Chicago, IL
View GitHub Profile
# Quicker navigation
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ......="cd ../../../../.."
alias .......="cd ../../../../../.."
# Aliases
alias ll='ls -l'
@iolson
iolson / .gitlab-ci.yml
Created September 22, 2015 22:52
GitLab CI Runner
# Before Script
before_script:
- composer self-update
- composer install --prefer-dist > /dev/null
- cp .env.example .env
- php artisan key:generate
- php artisan migrate:refresh --seed
# Services
services:
@iolson
iolson / .env.example
Created September 17, 2015 22:14
GitLab CI Laravel 5.1.*
DB_HOST=mysql
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
# Before Script
before_script:
- composer self-update
- composer install --prefer-dist > /dev/null
- cp .env.example .env
- php artisan key:generate
- php artisan migrate:refresh
# Services
services:
# Before Script
before_script:
- composer install --prefer-dist > /dev/null
- cp .env.example .env
- php artisan key:generate
# Variables
variables:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: homestead
@iolson
iolson / README.md
Created August 4, 2015 17:38
Get Ramped Up on Laravel

Homestead

$ composer global require "laravel/homestead=~2.0"
$ homestead init
$ homestead edit
$ homestead up

Default Database

<?php
namespace App\Http\Controllers\Dashboard;
use App\Repositories\Setting\SettingRepositoryInterface as Setting;
use Illuminate\Database\QueryException;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\View\View;
use Laracasts\Flash\Flash;
@iolson
iolson / .bash_profile
Created July 23, 2015 23:52
New Package
alias newpackage='git clone [email protected]:laraflock/skeleton.git newpackage && rm -rf newpackage/.git'
@iolson
iolson / passwordvalidation
Last active August 29, 2015 14:25 — forked from Michael-Brooks/passwordValidation.php
Laravel Password validation Regex (Contain at least one uppercase/lowercase letters and one number)
/*
* Place this with the rest of your rules.
* Doesn't need to be in an array as there are no pipes.
*/
$rules = array(
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'
);
/*
* Use this one if you also require at least one symbol.