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 Continue reading Give User Access Specific Database (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. Continue reading Can’t Write/Access Directory – Centos 7

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 … Continue reading Move Active Window with WMCTRL (Without Alt+Tab)

running scanner on arch linux

first all we need install packages called SANE sudo pacman -S sane then show list scanner we want use $ scanimage -L device `v4l:/dev/video0′ is a Noname UVC Camera (eb1a:013a) virtual device device `pixma:04A9174E_517EB0′ is a CANON Canon PIXMA MX410 multi-function peripheral the device called pixma:04A9xxxxxxx is my plug scanner, then input your document into scanner. and running this command on your fucking shell. $scanimage … Continue reading running scanner on arch linux

Allow webfonts in subdomain with .htaccess

setting your htaccess with below script (ex: in your asset domain or cookieless free domain) # Allow access from all domains for webfonts. # Alternatively you could only whitelist your # subdomains like “subdomain.example.com”. Header set Access-Control-Allow-Origin “*” fucking done. source: http://stackoverflow.com/questions/26125030/font-awesome-icons-not-showing-in-chrome-a-maxcdn-related-cross-origin-resource Continue reading Allow webfonts in subdomain with .htaccess