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 | |
// Call controller from route closure | |
Route::get('/example', function() | |
{ | |
// Run controller and method | |
$app = app(); | |
$controller = $app->make('ExampleController'); | |
return $controller->callAction('index', $parameters = 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
server { | |
server_name www.abc.com; | |
return 301 $scheme://abc.com$request_uri; | |
} | |
server { | |
listen 80; | |
server_name abc.com; |
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
gzip on; | |
gzip_static on; | |
gzip_proxied any; | |
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript font/ttf application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml; | |
gzip_vary on; | |
gzip_disable "MSIE [1-6]\.(?!.*SV1)"; |
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
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
multi_accept on; |
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://stackoverflow.com/questions/11305797/remove-zero-width-space-characters-from-a-javascript-string | |
* U+200B zero width space | |
* U+200C zero width non-joiner Unicode code point | |
* U+200D zero width joiner Unicode code point | |
* U+FEFF zero width no-break space Unicode code point | |
*/ | |
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 | |
/** | |
* Return an ID of an attachment by searching the database with the file URL. | |
* | |
* First checks to see if the $url is pointing to a file that exists in | |
* the wp-content directory. If so, then we search the database for a | |
* partial match consisting of the remaining path AFTER the wp-content | |
* directory. Finally, if a match is found the attachment ID will be | |
* returned. | |
* |
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
# --------------------------------------------------------------------------- | |
# | |
# Mine: | |
alias composer="/usr/local/bin/composer.phar" | |
alias dump="composer dump-autoload" | |
alias www="cd /Applications/XAMPP/xamppfiles/htdocs/" | |
alias pong="ping 8.8.8.8" | |
alias bitpush="git push bitbucket master" |
NewerOlder