yum search exfat yum install -y exfat-utils.x86_64 fuse-exfat.x86_64
Add multimedia support centos 7
Install Handbrake, VLC and smplayer cd /tmp wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install epel-release-latest-7.noarch.rpm yum -y install http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm yum install vlc smplayer ffmpeg HandBrake-{gui,cli} yum install libdvdcss gstreamer{,1}-plugins-ugly gstreamer-plugins-bad-nonfree gstreamer1-plugins-bad-freeworld Install Flash Plugin for Firefox yum -y install http://linuxdownload.adobe.com/linux/x86_64/adobe-release-x86_64-1.0-1.noarch.rpm yum install flash-plugin
SSH Login Without Password
root@local-host$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa):[Enter key] Enter passphrase (empty for no passphrase): [Press enter key] Enter same passphrase again: [Press enter key] Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. ssh-copy-id -i…
Replace character with new line vi
:s/,/,^M/g To get the ^M character, type ctrl-v and hit enter. Under Windows, do ctrl-q enter.
Bash add single quote to comma delimited csv
awk ‘{gsub(/^|$/,”\x027″);gsub(/,/,”\x027,\x027″)}7’ filename >newfilename vi newfilename :%s/\r//g
lsyncd error terminating since out of inotify watches
echo 65536 > /proc/sys/fs/inotify/max_user_watches or sysctl fs.inotify.max_user_watches=65536 vi /etc/sysctl.conf #fix lsyncd error terminating since out of inotify watches fs.inotify.max_user_watches=65536
Force all traffic to be SSL
vi .htaccess RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.domain.com/$1 [R,L]
OpenSSL CSR Generation Centos
1. Generate CSR openssl req -nodes -newkey rsa:2048 -keyout www.domain.key -out www.domain.csr Country Name (2 letter code) [AU]: US State or Province Name (full name) [Some-State]: State Locality Name (eg, city) []: City Organization Name (eg, company) [Internet Widgits Pty Ltd]: Company Name Organizational Unit Name (eg, section) []: Webhosting…
Php dynamic forms not caching form fields
Form Fields are not Populated after Pressing Back Button 1. Create the file: cache.html 2. chmod 666 cache.html 3. Add this code to the top of your php form page $cachefile = ‘cache.html’; $cachetime = 4 * 60; // Serve from the cache if it is younger than $cachetime if…
Scroll to top of page after form submit
<head> <script type=”text/javascript”> parent.window.scrollTo(0,0); </script> </head> Or <body onload=”parent.window.scrollTo(0,0); “>