Archive for November 2015

Git force push to overwrite on remote

git push -f origin myremotebranch git push -f myprivate master:master git push -f

Linux how-to delete the first line in text file

tail -n +1 filename.txt > filename.txt.new

Git reset hard to make local as remote branch

git reset –hard origin/master

git http ssl import/export no certificate verify

export GIT_SSL_NO_VERIFY=1

Laravel last query raw output

<?php   dd(\DB::getQueryLog());

php enable errors

<?php   error_reporting(-1); ini_set(’display_errors’, ‘On’);

php when pass by reference

1. Objects should be passed by reference always, arrays and scalars are passed by value. 2. If you are working on a very large array and plan on modifying it inside a function, you actually should use a reference to prevent it from getting copied, which can seriously decrease performance or even exhaust your memory […]

git changing master branch

git checkout new-master git branch -m master old-master git branch -m new-master master

Laravel db migration commands

php artisan migrate php artisan migrate:rollback

Generate pdf from jpg files

Use convert utility from ImageMagick package /usr/bin/convert *.jpg result.pdf