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.
<?php | |
namespace Laravel\Dusk { | |
class Browser | |
{ | |
use Concerns\InteractsWithAuthentication, | |
Concerns\InteractsWithCookies, | |
Concerns\InteractsWithElements, | |
Concerns\InteractsWithJavascript, |
RequestInterface
; ResponseInterface
| null
)
# Ubuntu 14 | |
sudo nano /etc/rc.local | |
mount -t vboxsf share_name_in_virtual_box /var/www/project |
# 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 | |
This gist is about:
Mainly:
function
cannot (should not) be used when side-effects occur# Install | |
# via http://askubuntu.com/questions/510056/how-to-install-google-chrome | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable | |
# Update |
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
$ git ls-files | xargs wc -l |
<?php | |
class BaseModel extends Eloquent { | |
public static function isJoined($query, $table) | |
{ | |
$joins = $query->getQuery()->joins; | |
if($joins == null) { | |
return false; | |
} |