This file contains 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
#run php server from terminal | |
sudo php -S <domain>:<port> |
This file contains 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
//Install laravel 4 | |
git clone -b develop git://github.com/laravel/laravel.git . | |
//Run Server | |
//sudo php -S domain.dev:80 | |
sudo php -S domain.dev:80 -t public/ | |
php artisan serve | |
//Exec autoload | |
composer dump-auto |
This file contains 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 | |
'mysql' => array( | |
'driver' => 'mysql', | |
'host' => 'localhost', | |
'database' => 'database', | |
'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock', | |
'username' => 'root', | |
'password' => 'root', | |
'charset' => 'utf8', |
This file contains 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
// | |
// NSMutableDictionary+Utilities.h | |
// | |
// Created by Daniel Gutierrez on 11/26/13. | |
// | |
#import <Foundation/Foundation.h> | |
@interface NSMutableDictionary (Utilities) |
This file contains 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
module.exports = function(grunt) { | |
// set up grunt | |
}; |
This file contains 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 base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
This file contains 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 | |
//Custom pagination | |
function wp_bootstrap_pagination() | |
{ | |
global $wp_query; | |
$big = 999999999; | |
$current = max(1, get_query_var('paged')); | |
$paginate = paginate_links(array( |
This file contains 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
javascript:(function(){ window.open('http://url2pin.it/'+window.location.host+window.location.pathname, 'http://url2pin.it/');})(); |
This file contains 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 | |
//http://markvaneijk.com/route-patterns-in-laravel | |
Route::pattern('id', '[0-9]+'); | |
Route::pattern('hash', '[a-z0-9]{32}'); | |
Route::pattern('slug', '[a-z0-9-]+'); | |
Route::pattern('username', '[a-z0-9-]{3,20}'); |
This file contains 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
$.fn.preload = function() { | |
this.each(function(){ | |
$('<img/>')[0].src = this; | |
}); | |
} | |
// Usage: | |
$(['img1.jpg','img2.jpg','img3.jpg']).preload(); |
OlderNewer