Skip to content

Instantly share code, notes, and snippets.

View mogetutu's full-sized avatar

Isaak Mogetutu mogetutu

View GitHub Profile
@mogetutu
mogetutu / gist:3964328
Created October 27, 2012 11:19
Laravel Nginx Config
http://paste.laravel.com/8D7
@mogetutu
mogetutu / Filter.php
Created December 10, 2012 13:49
Role Based Controller Filters
<?php
// Controller
function __construct()
{
parent::__construct();
$this->filter('before', 'role:Administrator');
}
// filter
Route::filter('role', function($role)
{
<?php // bundles/api_v1/controllers/example.php
class Api_V1_Example_Controller extends Controller
{
public $restful = True;
public function get_hello($name='World')
{
return "Hello, {$name}!";
}
@mogetutu
mogetutu / Installing mysql gem mountain lion
Created January 5, 2013 15:55
Installing mysql gem mountain lion
env ARCHFLAGS="-arch x86_64" sudo gem install mysql -v='2.9.0' -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/mysql/bin/mysql_config

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

Awesome PHP Libraries

A list of amazingly awesome PHP libraries that you should consider using (and some other shiny extras).

# Initial setup
git clone -o framework -b develop https://github.com/laravel/laravel.git project-name
cd project-name
git checkout --orphan master
git commit -m "Initial commit"
# Pulling changes
git fetch framework
git merge --squash -m "Upgrade Laravel" framework/develop
# Fix merge conflicts if any and commit

Awesome PHP Libraries

A list of amazingly awesome PHP libraries that you should consider using (and some other shiny extras).

$ npm install ember-tools
$ export PATH=/usr/local/share/npm/lib/node_modules/ember-tools/bin:$PATH
/**
* Make array Keys = Values
*
* @return array
*/
function dictionary($array = array())
{
return array_combine(array_values($array), array_values($array));
}