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
# http://stackoverflow.com/questions/19050516/combine-htaccess-rules-remove-extension-and-rewrite-url-variables?rq=1 | |
Options +FollowSymLinks -Indexes -MultiViews | |
RewriteEngine On | |
RewriteBase /subdirectory | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^([^/]+)/$ $1 [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f |
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
pear uninstall PHP_CodeSniffer | |
pear config-set php_bin change/path/to | |
pear config-set bin_dir change/path/to | |
pear install PHP_CodeSniffer |
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
# | |
# This should be changed to whatever you set DocumentRoot to. | |
# | |
<Directory "/Library/WebServer/Documents"> | |
# | |
# Possible values for the Options directive are "None", "All", | |
# or any combination of: | |
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews | |
# | |
# Note that "MultiViews" must be named *explicitly* --- "Options All" |
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
Checklist: | |
- Check if your user exists in: /private/etc/apache2/users | |
- Check if your path is correct inside conf file: | |
<Directory "/Users/username/Projects"> | |
Options Indexes MultiViews | |
AllowOverride None | |
Order allow,deny | |
Allow from all | |
</Directory> |
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
mysql_secure_installation |
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://wordpress.stackexchange.com/questions/110895/adding-custom-stylesheet-to-wp-admin | |
//from functions.php | |
//First solution : one file | |
add_action( 'admin_enqueue_scripts', 'load_admin_style' ); | |
function load_admin_style() { | |
wp_register_style( 'admin_css', get_template_directory_uri() . '/admin-style.css', false, '1.0.0' ); | |
//OR | |
wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/admin-style.css', false, '1.0.0' ); |
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
//em construcao | |
date_default_timezone_set("America/Sao_Paulo"); | |
if (Session::has('access') or (time() > mktime(0, 0, 1, 8, 23, 2014))) { | |
Route::get('/', 'HomeController@index'); | |
} else { | |
Route::get('/', function () { | |
return View::make('underConstruction'); | |
}); | |
} | |
Route::get('/your-url-here', function () { |
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
$ find . -type f -name '*.DS_Store' -ls -delete # Remover arquivos .DS_Store de forma recursiva (mac users). #unixtip |
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
$( document ).ready(function() { | |
$("a").attr("target","_blank"); | |
}); |
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
-without-homebrew-php |