This file contains hidden or 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
<IfModule mod_mime.c> | |
# Audio | |
AddType audio/mp4 m4a f4a f4b | |
AddType audio/ogg oga ogg | |
# JavaScript | |
# Normalize to standard type (it's sniffed in IE anyways): | |
# http://tools.ietf.org/html/rfc4329#section-7.2 | |
AddType application/javascript js |
This file contains hidden or 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
<? $data = get_fields();?> | |
<script> | |
console.log(<?= json_encode($data) ?>) | |
</script> |
This file contains hidden or 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->app['request']->server->set('HTTPS', $this->app->environment() != 'local'); |
This file contains hidden or 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
# /app/Exceptions/Handler.php | |
# use Symfony\Component\Debug\Exception\FlattenException; | |
# public function render($request, Exception $e) | |
$exception = FlattenException::create($e); | |
$statusCode = $exception->getStatusCode($exception); | |
if ($statusCode === 404 or $statusCode === 500 and app()->environment() == 'production') { |
This file contains hidden or 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
gulp.task('cacheBuster', function(cb){ | |
//new Date().getTime() | |
fs.writeFile('config/cacheBuster.php', '<?php return ' + new Date().getTime() + ';', cb); | |
}); |
This file contains hidden or 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
<? | |
/* | |
I am using route caching that prevents me from using closures, but even then I don't see why I can't choose to pass static information to a controller without using route parameters. | |
For example, My project has an umber of redirects in it, and rather than loading up 40 domains with redirect DNS entries that only I have access to. | |
I have a helper controller to do this so that my team may make entries. | |
I am running 40 unique sites out of one Laravel instance to keep my maintenance low. 40 sites x about 25 redirects is a lot of DNS entries. | |
*/ |
This file contains hidden or 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
SELECT | |
table_schema as `Database`, | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM information_schema.TABLES | |
ORDER BY (data_length + index_length) DESC; |
This file contains hidden or 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 | |
/* | |
* Since WordPress is event driven, the wp-cron's will run on every single page load. | |
* This means if you have a larger WordPress site your doing a lot of extra leg work for noreason. | |
* This fixes that on Multsites | |
* | |
* Add this file to the root of your WordPress site and then add define('DISABLE_WP_CRON', 'true'); | |
* to your wp-config.php | |
* | |
* Make sure that you create a true CRON job that will call your site URL via curl |
This file contains hidden or 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
Show hidden characters
{ | |
"plugins": [ | |
"transform-object-rest-spread", | |
"transform-class-properties", | |
"transform-react-constant-elements", | |
"transform-decorators-legacy" | |
], | |
"presets": [ | |
["es2015", {"modules": false}], | |
"react" |
This file contains hidden or 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 | |
namespace App\Exceptions; | |
use Exception; | |
use Illuminate\Auth\AuthenticationException; | |
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | |
class Handler extends ExceptionHandler | |
{ |