Set timezone
sudo dpkg-reconfigure tzdata
Set date time
sudo date --set "23 Dec 2016 4:36:00"
Set timezone
sudo dpkg-reconfigure tzdata
Set date time
sudo date --set "23 Dec 2016 4:36:00"
List ondrej trusty list
sudo ls /etc/apt/sources.list.d
move ondrej-php5-5_6-trusty.list to home (idea is to delete)
sudo mv /etc/apt/sources.list.d/ondrej-php5-5_6-trusty.list ~/
Add new ppa
If you haven't commited the changes, then:
git diff > mypatch.patch But sometimes it happens that part of the stuff you're doing are new files that are untracked and won't be in your 'git diff' output. So, one way to do a patch is to stage everything for a new commit (but don't do the commit), and then:
git diff --cached > mypatch.patch Add the 'binary' option if you want to add binary files to the patch (i.e. mp3 files):
git diff --cached --binary > mypatch.patch You can later apply the patch:
# Copy | |
rsync -ah --info=progress2 earn2learn-dev-gayan earn2learn-dev-gayan-10102016-4 |
<?php | |
/* | |
* php artisan tinker => and put following closure in. | |
* This will listen for database queries | |
* and print them on tinker the fly | |
*/ | |
DB::listen(function ($query) { | |
var_dump($query->sql); | |
}); |
Link - https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md
sudo apt-get install python-software-properties
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install nodejs
# Credit: http://stackoverflow.com/a/3855359 | |
lsof -i tcp:3000 |
# Credit: http://www.keyboardninja.eu/linux/find-the-10-largest-directories-in-linux | |
du -BM / | sort -n -r | head -n 10 |