alias gb='git branch XXX---$(git rev-parse --abbrev-ref HEAD)---$(date +%Y-%m-%d_%H-%M-%S)'
and add it to
gedit ~/.bash_aliases
alias gb='git branch XXX---$(git rev-parse --abbrev-ref HEAD)---$(date +%Y-%m-%d_%H-%M-%S)'
and add it to
gedit ~/.bash_aliases
To get absolute datetime when system started you can use following command:
last reboot | head -1
In ubuntu to turn off and on monitor using command:
xrandr --output DP1 --off
To turn it on again, left of HDMI monitor you can use:
xrandr --output DP1 --left-of HDMI1 --auto
To list monitors, to see their names ie HDM1, DP1 etc:
 xrandr -q
find . -type f | shuf -n 1 | xargs -d "\n" xdg-open
Opens random file in current directory with default program, it traverses directories recursively
mogrify -resize 50% *.jpg
install by:
sudo apt-get install imagemagick
Simple query to get count of all tables in database, as real data:
SET @tableSchema = 'my_schema'; SET SESSION group_concat_max_len = 10000000; SET @rowCounts = ( SELECT group_concat(CONCAT('SELECT ''',TABLE_NAME,''', COUNT(*) FROM ', TABLE_NAME) SEPARATOR ' union all ') FROM information_schema.tables WHERE table_schema = @tableSchema ); PREPARE statement FROM @rowCounts; EXECUTE statement; -- don't run dealloc until you've exported your results ;) DEALLOCATE PREPARE statement;
It is also possible to use:
SELECT TABLE_NAME, TABLE_ROWS FROM `information_schema`.`tables` WHERE `table_schema` = 'YOUR_DB_NAME';
but it gives only estimates
ng() { gnome-terminal -x sh -c "$*; bash"; }
shortcut for .bashrc
Usage:
ng cat /etc/hosts
https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-on-ubuntu-16-04-lamp/
https://httpd.apache.org/docs/current/vhosts/examples.html
apt-get install php-redis
apt-get install php-xdebug
php7.0-curl
sudo apt install php7.0-sqlite3
sudo apt-get install php7.0-soap
sudo apt install nautilus-admin
sudo apt-get install openssl
sudo apt-get install oracle-java8-installer
sudo apt install percona-toolkit
sudo apt-get install percona-server-server-5.7
sudo pear install PHP_CodeSniffer
sudo pear install PHP_CodeSniffer
sudo apt install phpcs
https://www.percona.com/doc/percona-server/5.7/installation/apt_repo.html
https://ubuntuforums.org/showthread.php?t=2275033
http://unix.stackexchange.com/questions/85973/how-to-edit-var-www-files-using-phpstorm
https://ubuntuforums.org/showthread.php?t=2275033
http://tomaszdziurko.pl/2015/11/1-and-the-only-one-to-customize-intellij-idea-memory-settings/
[XDebug] xdebug.remote_enable = 1 xdebug.remote_handler = "dbgp" xdebug.remote_host = "127.0.0.1" xdebug.remote_connect_back = 0 xdebug.max_nesting_level=10000