Skip to content

Instantly share code, notes, and snippets.

Working from home

Carlton carltondickson

Working from home
  • Carlton Dickson Development Ltd.
  • London
View GitHub Profile
DawidMyslak /
Last active Dec 8, 2022
Vue.js and Vuex - best practices for managing your state

Vue.js and Vuex - best practices for managing your state

Modifying state object


If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).

Example below explains implications for different implementations.

View _browser_ide_helper.php
namespace Laravel\Dusk {
class Browser
use Concerns\InteractsWithAuthentication,
mgirouard /
Created Jul 17, 2016
GuzzleHttp Exception Hierarchy
  • GuzzleException
    • SeekException
    • TransferException
      • RequestException ( RequestInterface ; ResponseInterface | null )
        • TooManyRedirectsException
        • ConnectException
        • BadResponseException
          • ServerException
  • ClientException
View gist:3d3c978faba5becf838b
# Ubuntu 14
sudo nano /etc/rc.local
mount -t vboxsf share_name_in_virtual_box /var/www/project
spalladino /
Created Dec 22, 2015
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
Ocramius /
Last active Jul 16, 2022
`__invoke` vs `function` vs `Closure`
mrtns / gist:78d15e3263b2f6a231fe
Last active Jan 3, 2023
Upgrade Chrome from Command Line on Ubuntu
View gist:78d15e3263b2f6a231fe
# Install
# via
wget -q -O - | sudo apt-key add -
sudo sh -c 'echo "deb stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
# Update
goranprijic / BaseModel.php
Created Dec 17, 2014
Check if table is already joined in Laravel Query Builder
View BaseModel.php
class BaseModel extends Eloquent {
public static function isJoined($query, $table)
$joins = $query->getQuery()->joins;
if($joins == null) {
return false;
aczietlow /
Last active Nov 20, 2022 — forked from huangzhichong/
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);

JamesMGreene /
Last active Jan 22, 2023
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.


gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository