Linux installation notes (tested under Ubuntu 14.04LTS/12.04LTS), assuming VirtualBox is already installed on host.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (Config::get('app.debug')) { | |
Event::listen('illuminate.query', function($query, $bindings, $time, $name) { | |
$data = compact('bindings', 'time', 'name'); | |
// Format binding data for sql insertion | |
foreach ($bindings as $i => $binding) { | |
if ($binding instanceof \DateTime) { | |
$bindings[$i] = $binding->format('\'Y-m-d H:i:s\''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 404 | |
App::missing(function($exception) | |
{ | |
if (!Config::get('app.debug')) { | |
return Response::view('errors.missing', array(), 404); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// The current page you're looking at, defaults to the first page. | |
$page = empty($inputs['page']) ? 1 : $inputs['page']; | |
// Number of records to display per page. | |
$per_page = 20; | |
// Total number of records to use for generating pages. This is now dynamic, so for anyone interested in anything beyond page 10, it will dynamically show 9 more pages if you click on page 10, until the end of the table. | |
$total = empty($inputs['quantidade']) ? 50 : $inputs['quantidade']; | |
$total = ($total - $per_page) + ($page * $per_page); | |
// Get the number of records per page, starting at the page number minus 1. Imagine you're looking at page 1, then it should skip 0 records. | |
$contatos = $contatos->take($per_page) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Cidades extends Seeder { | |
public function run() | |
{ | |
DB::select(DB::raw("INSERT INTO `cidade` (`id`, `nome`, `estado_id`, `created_at`, `updated_at`) VALUES | |
(1, 'Afonso Cláudio', 8, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP ), | |
(2, 'Água Doce do Norte', 8, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP ), | |
(3, 'Águia Branca', 8, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(source gnu) | |
(source melpa) | |
(depends-on "cask") | |
(depends-on "color-theme-sanityinc-tomorrow") | |
(depends-on "expand-region") | |
(depends-on "ace-jump-mode") | |
(depends-on "auto-complete") | |
(depends-on "flx-ido") | |
(depends-on "yasnippet") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'package) | |
(package-initialize) | |
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(add-to-list 'load-path "~/emacs-packages/") | |
(load "~/emacs-packages/workaround-mumamo-buffer-file-name-warnings.el") | |
(load "~/emacs-packages/nxhtml/autostart.el") | |
;; smooth-scrolling | |
(require 'smooth-scrolling) |
Quick uninstall JetBrains settings:
curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | sudo bash -s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew tap homebrew/dupes && \ | |
brew tap homebrew/versions && \ | |
brew tap homebrew/dupes && \ | |
brew reinstall php56 \ | |
--with-fpm \ | |
--without-apache \ | |
--with-mysql \ | |
--with-intl \ | |
--with-mcrypt \ | |
--with-postgresql \ |