- http://www.boe.es/buscar/doc.php?coleccion=anboe&id=2013/033156
- http://www.boe.es/buscar/doc.php?coleccion=anboe&id=2013/33156
- http://www.boe.es/buscar/doc.php?id=BOE-B-2013-33156
- http://www.boe.es/buscar/act.php?id=BOE-B-2013-33156
- http://www.boe.es/diario_boe/txt.php?id=BOE-B-2013-33156
- http://www.boe.es/diario_boe/xml.php?id=BOE-B-2013-33156
- http://www.boe.es/diario_borme/xml.php?id=BOE-B-2013-33156 !
- http://www.boe.es/boe/dias/2013/09/07/
- http://www.boe.es/boe/dias/2013/09/07/index.php
Quick tip for handling CSRF Token Expiration - common issue is when you use csrf protection is that if | |
a form sits there for a while (like a login form, but any the same) the csrf token in the form will | |
expire & throw a strange error. | |
Handling it is simple, and is a good lesson for dealing with other types of errors in a custom manner. | |
In Middleware you will see a file VerifyCsrfToken.php and be tempted to handle things there. DON'T! | |
Instead, look at your app/Exceptions/Handler.php, at the render($request, Exception $e) function. | |
All of your exceptions go through here, unless you have excluded them in the $dontReport array at the |
var system = require("system"); | |
var url = system.args[1]; | |
require('./phantom-full-load')(phantom, url, function (page, logs) { | |
logs.forEach(function (i) { | |
console.log('> ' + i); | |
}); | |
result = page.evaluate(function () { | |
return $('body *').attr('class'); |
DB_HOST=mysql | |
DB_DATABASE=homestead | |
DB_USERNAME=homestead | |
DB_PASSWORD=secret |
<?php | |
namespace Thinkscape\Guzzle; | |
use Psr\Http\Message\RequestInterface; | |
use Psr\Http\Message\ResponseInterface; | |
class EffectiveUrlMiddleware | |
{ | |
/** | |
* @var Callable |
<?php | |
namespace League\Skeleton; | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Routing\Router; | |
class SkeletonServiceProvider extends ServiceProvider | |
{ | |
/** |
Grab ffmpeg from https://www.ffmpeg.org/download.html
It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.
The most trivial operation would be converting gifs:
ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
-crf
values can go from 4 to 63. Lower values mean better quality.-b:v
is the maximum allowed bitrate. Higher means better quality.
<?php | |
// in wordpress theme: functions.php add this in | |
function log_sql_queries($text_query){ | |
/* //Uncomment me if you want a lot of info about where the sql query comes from and what action started it off | |
$traces = debug_backtrace(); | |
$i = 0; | |
foreach ($traces as $tobj => $trace) { | |
if($trace['function'] == 'do_action'){ |
When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.
This is enabled by adding the
ForwardAgent yes
option to any of your Host
entries in ~/.ssh/config
(or alternatively with the -A
option). Don't set this option in a wildcard Host *
section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.
Support for keeping an audit trail for any state machine, borrowed from the Ruby StateMachine audit trail gem. Having an audit trail gives you a complete history of the state changes in your model. This history allows you to investigate incidents or perform analytics, like: “How long does it take on average to go from state a to state b?”, or “What percentage of cases goes from state a to b via state c?”
- PHP >= 5.4
- Laravel 4 framework