Advanced Search
Search Results
97 total results found
Development, Programming & DevOps
All about software development, including development operations, methodologies, programming, continuous integration etc.
Checklists & Cheatsheets
All kinds of checklists and cheatsheets
Linux
All about Linux including various configuration procedures, scripts and tips
Windows
Windows administration scripts and tricks
General
Anything that are related to Linux but does not fit into the category of networking, storage, database or Desktop Environments
MySQL / MariaDB & MongoDB
Everything about MySQL / MariaDB and MongoDB
PHP, Javascript & HTML
All about PHP, JS and HTML including its frameworks
Git and SVN
All about Git and SVN
CSS
Everything about CSS
Everything About APIs
Solutions and tricks for all types of APIs including Facebook and Google
CMS/E-Commerce
All content management system and E-Commerce platform related stuff such as Joomla!, Drupal and Wordpress
Networking
Linux network troubleshooting and administration
Storage
Storage administration and tricks, including LVM, SCSi etc.
System
Linux system tools, administration and tips
Desktop Environments
Everthing to do about Desktop Environments, including LXDE, XFCE, KDE and Gnome
Software Development
All about software development tricks on Linux
Scripts
Contains all the script I used for my administration
Server Software
Server software configuration and installation procedures such as Apache, and Postfix
Sound
Linux sound problems, configuration and installation
Ansible
Contains everything on Ansible IT automation tool, playbooks and tricks
Migrating Self-Signed SSL Certificate to LetsEncrypt Certificate
Download Let's Encrypt Client sudo -s git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt Update Apache Configuration Let's Encrypt does not detect multiple virtual host in a single file, so if you have multiple virtual hosts in a singl...
Setup SFTP to Public Directory (/var/www)
Configuring SSH for SFTP vim /etc/ssh/sshd_config Comment the following line: Subsystem sftp /usr/local/libexec/sftp-server Add the following lines: Subsystem sftp internal-sftp Match Group <sftp group> ChrootDirectory %h ForceCommand ...
Using LetsEncrypt for OpenVPN WebSSL
Using letsencrypt for OpenVPN Access Server is nothing more than symlinking the files to letsencrypt keys and certs: sudo -s cd /usr/local/openvpn_as/etc/ mv web-ssl web-ssl.bak mkdir web-ssl ln -s /etc/letsencrypt/live/<letsencrypt domain dir>/pri...
Standard Procedures for CakePHP Application Deployment
1. Clone Source File git clone <git url> 2. Setup Database mysql -uroot -p create database <database name>; grant all on <database name>.* to '<id>'.'localhost' identified by '<password>'; cd <path/to/cakephp>/app ...
Standard Installation Procedures for LAMP Stack on CentOS 7
1. System Upgrade yum -y update 2. Install Required Software yum -y install git policycoreutils-python httpd mariadb mariadb-server php-mysql php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel 3. Setup M...
Standard CentOS Workstation Setup
Install GUI (MATE Desktop) sudo yum install epel-release sudo yum groupinstall 'X Window System' sudo yum groupinstall 'MATE Desktop' sudo systemctl isolate graphical.target sudo systemctl set-default graphical.target Install Printer sudo yum install...
Postfix and Dovecot Configuration
Installation hostnamectl set-hostname mail.<domain>.<tld> yum -y install postfix dovecot Postfix Configuration Append the following to /etc/postfix/main.cf: myhostname = mail.<domain>.<tld> mydomain = <domain>.<tld...
CentOS Installation Issues
HP Microserver Gen 7 Kernel Panic on Boot (Both Live USB and New Installation) Add the following lines to the kernel boot parameters: nolapic clocksource=hpet Blank Screen on Startup Append nomodeset to kernel param
Changing Default S2RAM to USWSUSP Suspend Module
If you have any issues to suspend your laptop e.g. suspend command doesn't work on your laptop, try changing the default sleep module to uswsusp: Edit /etc/pm/config.d/module and add the following line: SLEEP_MODULE=uswsusp Edit /etc/pm/config.d/defau...
Fixing Incorrect Lid State by Hacking DSDT
When I install a Linux distro to my VAIO notebook, I found that there is an annoying bug with the lid switch. It does not get updated whenever I suspend on lid close, it means cat /proc/acpi/button/lid/LID/state will output state: close. When I close the lid a...
LAMP Stack Upgrade Issues
"Table Doesn't Exists" After MySQL/MariaDB Upgrade Paste MySQL data directory to upgraded data directory, containing ibdata1, ib_logfile0 and ib_logfile1, in lampp, it's /opt/lampp/var/mysql: sudo cp /opt/lampp_backup/var/mysql /opt/lampp/var/mysql sudo ch...
E: [pulseaudio] module.c: Failed to load module "module-equalizer-sink" (argument: ""): initialization failed.
Symtoms Starting pulseaudio will forever Establishing connection, pulseaudio -v will reveal the following errors: W: [pulseaudio] module-equalizer-sink.c: module-equalizer-sink is currently unsupported, and can sometimes cause PulseAudio crashes, increased ...
LVM Extending from New Physical Volume
Create new physical volume from new partition Use fdisk utility to create new partition pvcreate /dev/<new partition> pvs Adding physical volume to volume group vgextend <volume group> /dev/<new partition> Extending logical volume ...
Syncing Files with FTP
I came across a problem when doing migration last time, the server grew too big that I cannot just simply compress the files and move it to another server, it was more than 20GB files. So, I came across an FTP client called LFTP that will synchronize files and...
Useful PHP Codes
Increment a Date by Month, Day or Year Increment by month $time = strtotime("2014-12-11");$d = date("Y-m-d", strtotime("+1 month", $time)); Increment by day $time = strtotime("2014-12-11");$d = date("Y-m-d", strtotime("+1 day", $time)); ...
Patching with Git
Creating a Patch Patch for Working Copy (Not Committed) git diff > patch.diff Patch from one commit to another git diff <from-commit-hash> <to-commit-hash> > patch.diff Patching a Project Generated from git diff Applying a Patch: git a...
How to do Everything in MySQL/MariaDB
Useful Tricks Convert a Column to Uppercase UPDATE table_name SET column_name = UPPER( column_name ) Show and Change View Definer SHOW FULL TABLES IN database_name WHERE TABLE_TYPE LIKE 'VIEW';SHOW CREATE VIEW [view_name];ALTER DEFINER = '[username]'@'[ho...
Setup for Remote Access
Grant Privileges GRANT ALL ON <database>.* TO <user>@'%' IDENTIFIED BY '<password>'; Testing Remote Access mysql -uroot -p -h <host/ip> <database>
Standard PHP/JS/HTML Procedures
Updating PHPUnit to Version 3.7 sudo mv /opt/lampp/lib/php/PHPUnit /opt/lampp/lib/php/PHPUnit.bakcurl -sS https://getcomposer.org/installer | phpsudo mv composer.phar /opt/lampp/bin/composersudo rm -rf /opt/lampp/share/openssl/certs/sudo ln -s /etc/ssl/cert.p...
How to do Everything in CakePHP 2.x
Writing Test Case for AuthComponent's login() Function with CakePHP's Mocking $this->controller = $this->generate('Users', array( 'components' => array('Auth' => array('login')) //Mock all Auth methods ));//This will make sure that Auth->log...