Stash current changes
- git > Stash > Stash (Include Untracked)
Create stash as patch
git stash show "stash@{0}" -p > changes.patch
Apply patch
A curated list of arrrrrrrrr!
In my opinion, The Matrix films provide the best metaphor our society has for understanding why organized evil and
<?php | |
function tinker(...$args) { | |
// Because there is no way of knowing what variable names | |
// the caller of this function used with the php run-time, | |
// we have to get clever. My solution is to peek at the | |
// stack trace, open up the file that called "tinker()" | |
// and parse out any variable names, so I can load | |
// them in the tinker shell and preserve their names. |
<?php | |
function chain($object) | |
{ | |
return new class ($object) { | |
protected $lastReturn = null; | |
public function __construct($object) | |
{ | |
$this->wrapped = $object; |
Here is the list of Chrome Driver command line Arguments.
If you are using chrome Driver for Selenium WebDriver or Protractor or …. then these are a handy useful list of command line arguments that can be used.
You may use this to look at the usuage: https://code.google.com/p/chromium/codesearch#chromium/src/chromeos/chromeos_switches.cc
Run chromedriver –help
to see command line arguments for your version.
<?php | |
class Pipeline | |
{ | |
public static function make_pipeline(...$funcs) | |
{ | |
return function($arg) use ($funcs) | |
{ | |
foreach ($funcs as $func) | |
{ | |
$arg = $func($arg); |
DROP DATABASE IF EXISTS 📚; | |
CREATE DATABASE 📚; | |
USE 📚; | |
CREATE TABLE 👤( | |
🔑 INTEGER PRIMARY KEY, | |
🗣 varchar(64), -- name | |
🗓 DATE -- date of registration |
<?php | |
namespace App\Console\Commands; | |
use RuntimeException; | |
use Laravel\Dusk\Console\DuskCommand; | |
use Symfony\Component\Process\Process; | |
use Symfony\Component\Process\ProcessBuilder; | |
class DuskServeCommand extends DuskCommand { |
// Example: https://codepen.io/marcelo-ribeiro/pen/OJmVOyW | |
const accentsMap = new Map([ | |
["A", "Á|À|Ã|Â|Ä"], | |
["a", "á|à|ã|â|ä"], | |
["E", "É|È|Ê|Ë"], | |
["e", "é|è|ê|ë"], | |
["I", "Í|Ì|Î|Ï"], | |
["i", "í|ì|î|ï"], | |
["O", "Ó|Ò|Ô|Õ|Ö"], |