Change Guest Resolution Windows (Virtualbox)

First close virtualbox windows

then run this command in your terminal

$ VBoxManage setextradata global GUI/MaxGuestResolution any
$ VBoxManage setextradata "Win 10" "CustomVideoMode1" "1366x786x32"

source: https://superuser.com/questions/443445/how-can-i-get-virtualbox-to-run-at-1366×768

Advertisements

Give User Access Specific Database (MySQL)

Ok first we need to create user, login user as root to your MySQL

> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';

after create user, create database then give privileges to the user

> CREATE DATABASE new_database;
> GRANT ALL PRIVILEGES ON new_database.* TO 'newuser'@'localhost';

then flush privileges

> FLUSH PRIVILEGES;

OK DONE.

source: https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql

Can’t Write/Access Directory – Centos 7

type this command into your shell

# SELinux serve files off Apache, resursive
sudo chcon -t httpd_sys_content_t /data/www/html/sites/mysite -R
 
# Allow write only to specific dirs
sudo chcon -t httpd_sys_rw_content_t /data/www/html/sites/mysite/logs -R
sudo chcon -t httpd_sys_rw_content_t /data/www/html/sites/mysite/uploads -R

source: https://blog.lysender.com/2015/07/centos-7-selinux-php-apache-cannot-writeaccess-file-no-matter-what/

thx.

Move Active Window with WMCTRL (Without Alt+Tab)

first what we need is install the packages

$ sudo pacman -S wmctrl

after installing, modify your bashrc or zshrc to add alias like this:

...
alias subl3="subl3 && wmctrl -a \"\$(wmctrl -l | grep subl3 | cut -f 1,2,3,4 -d ' ' --complement)\" 2>&1 >/dev/null"

then test open your sublime text and another application/windows (in it)

open your run command subl3 / modify your run command preferences

prefix: chromium
command: wmctrl -a chromium

done.