Skip to content

Instantly share code, notes, and snippets.

View clauddiu's full-sized avatar

Claudiu clauddiu

View GitHub Profile
@clauddiu
clauddiu / sublime-command-line.md
Created May 17, 2016 10:56 — forked from adrianorsouza/sublime-command-line.md
launch sublime text from the command line

Launch Sublime Text from the command line on OSX

Sublime Text includes a command line tool, subl, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.

Requirements

  • Sublime text 2 or 3 installed in your system within Applications folder

Setup

@clauddiu
clauddiu / eloquent.php
Created December 7, 2012 15:50
Using Eloquent outside of Laravel 4 this extends gist https://gist.github.com/4107178
<?php
require 'vendor/autoload.php';
$resolver = new Illuminate\Database\ConnectionResolver;
$resolver->setDefaultConnection('default');
$factory = new Illuminate\Database\Connectors\ConnectionFactory;
$connection = $factory->make(array(
'host' => 'localhost',
'database' => 'database',