Skip to content

Instantly share code, notes, and snippets.

Avatar
🎵
git push it, git push it real good

Eric Barnes ericlbarnes

🎵
git push it, git push it real good
View GitHub Profile
View bootstrap.sh
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:ondrej/php5
sudo apt-get update
View vagrantstrap.sh
#!/usr/bin/env bash
# Configurable variables
database='vagrant'
username='vagrant'
password='vagrant'
echo ''
echo ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
echo ' Bootstrapping Ubuntu Precise 32bit for Laravel 4'
@dhrrgn
dhrrgn / parse.php
Created Jun 19, 2013
Parsing basic Jekyll format in PHP
View parse.php
<?php
// Note, you need symfony/yaml to parse the Front Matter
if ( ! Input::hasFile('file'))
{
// Do some fail here
return;
}
$contents = trim(File::get(Input::file('file')->getRealPath()));
@dhrrgn
dhrrgn / database.php
Created Jun 18, 2013
The database config file for Wardrobe on AppFog
View database.php
<?php
$services_json = json_decode(getenv("VCAP_SERVICES"), true);
$mysql_config = $services_json["mysql-5.1"][0]["credentials"];
return array(
/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
@JeffreyWay
JeffreyWay / laravel4.md
Created Nov 19, 2012
Laravel 4 Thoughts/Questions/Etc.
View laravel4.md

Laravel 4 Thoughts/Questions/Etc.

This is just a random list of notes, as I dig into Laravel 4. If you have any feedback/solutions, please leave a comment. I'll be compiling everything for an article on Nettuts+, when the framework is officially in Beta. This will be updated over the course of the week.

  • Running composer dump-autoload after every new controller is a pain. Can this not be automated through artisan controller:make ControllerName?

  • Seems that some of the View HTML helpers are missing. No HTML::script().

  • Route::resource('tasks', 'TasksController') doesn't seem to create named routes. This is a big deal, if not. What's the solution?

@erikreagan
erikreagan / mac-apps.md
Created Aug 4, 2012
Mac developer must-haves
View mac-apps.md

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@alexkingorg
alexkingorg / wp-stats.php
Created Jan 3, 2012
WordPress per-year blog stats
View wp-stats.php
<?php
header('Content-type: text/plain');
global $wpdb;
?>
<table class="numbers">
<thead>
<tr>
<th>&nbsp;</th>
@ritcheyer
ritcheyer / SublimeText2IconFix.sh
Created Nov 7, 2011
Fix Sublime Text 2 icon after update
View SublimeText2IconFix.sh
sudo curl -L -o icon.zip http://eandjdesign.com/icons/SublimeText2/icon.zip && unzip icon.zip && mv Sublime\ Text\ 2.icns /Applications/Sublime\ Text\ 2.app/Contents/Resources/
@jimeh
jimeh / jquery.myplugin.coffee
Created Apr 7, 2011
Example jQuery plugin written in CoffeeScript, and the resulting compiled JavaScript file.
View jquery.myplugin.coffee
$.fn.extend
myplugin: (options) ->
self = $.fn.myplugin
opts = $.extend {}, self.default_options, options
$(this).each (i, el) ->
self.init el, opts
self.log el if opts.log
$.extend $.fn.myplugin,
default_options: