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
From da7ebd37ec8b22d45ef424ea31ab27d592e1734c Mon Sep 17 00:00:00 2001 | |
From: Dan Horrigan <[email protected]> | |
Date: Fri, 21 Oct 2011 22:52:04 -0700 | |
Subject: [PATCH] Updating .box | |
--- | |
.box | 53 ++++++++++++++++++++++++++--------------------------- | |
1 files changed, 26 insertions(+), 27 deletions(-) | |
diff --git a/.box b/.box |
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 | |
/** | |
* Simple, yet effective CSRF class for FuelPHP. | |
* | |
* @author Dan Horrigan | |
* @license MIT License | |
* @copyright 2011 Dan Horrigan | |
*/ | |
/** |
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
// ==UserScript== | |
// @name Use Markdown, sometimes, in your HTML. | |
// @author Paul Irish <http://paulirish.com/> | |
// @link http://git.io/data-markdown | |
// @match * | |
// ==/UserScript== | |
// If you're not using this as a userscript just delete from this line up. It's cool, homey. |
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
web1: | |
env_vars: | |
FUEL_ENV: production | |
TWITTER_CONSUMER_KEY: foooooobar | |
TWITTER_CONSUMER_SECRET: foooooobar |
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
class ModuleGenerator < Rails::Generators::Base | |
source_root File.expand_path('../templates', __FILE__) | |
argument :module_name, :type => :string | |
def generate_module | |
apply_templates | |
end | |
private |
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 | |
$connection = Illuminate\Database\Connectors\ConnectionFactory::make([ | |
'driver' => 'mysql', | |
'host' => '', | |
'database' => '', | |
'username' => '', | |
'password' => '', | |
'charset' => '', | |
'prefix' => '', |
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 | |
use Illuminate\Database\Connectors\ConnectionFactory; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Database\ConnectionResolver; | |
use Illuminate\Database\DatabaseManager; | |
class Db { | |
private static $resolver = null; |
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 | |
// App setup up here | |
$users_controller = new Controller\Users($app); | |
$app->get('/users', [$users_controller, 'get_index']); | |
$app->get('/users/:id', [$users_controller, 'get_index']); | |
$app->post('/users', [$users_controller, 'post_index']); |
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 | |
// Currently without `retry` construct | |
do { | |
$retry = false; | |
try { | |
// Do some stuff here | |
} catch (Exception $e) { | |
if ($can_i_fix_this) { | |
// Fix it |
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 | |
// Routing via subdomain: | |
Route::get('foo', 'SomeController@foo')->setHostnamePattern('some.sub.domain.com'); |