Category: Tutorial
-
Handy Base Converter in Javascript
Just a simple handy javascript I found on stackoverflow for converting any arbitrary base for any precision. Whether it be base 10 to 64, base 2, base 32, etc. I plan to convert it to other language(s) someday for further use. Full credits of this code to the link above. This is mostly a self…
-
New (_blank) Window Icon for Accessibility
Found this really simple and clean CSS solution to adding new window icon.
-
cPanel/WHM’s annoying default webpage redirect cache
Solution Edit the following file: And add the following line of code in the <head> That’s it! The Problem Ever configure something wrong in cPanel/WHM and then you land on the default webpage that looks something like this? Which says something like… Sorry!If you are the owner of this website, please contact your hosting provider:…
-
How to use NewRelic with SELinux
NewRelic doesn’t seem to work with SELinux out of the box and it appears it’s out of the scope of NR’s support. So, here’s how to run NR while having SELinux protection. First, we’re going to create the rule file: # mkdir ~/newrelic # cd ~/newrelic # nano newrelic.te The contents of the file should…
-
Protected: Cron jobs, the pros and cons of multiple ways to set them
There is no excerpt because this is a protected post.
-
Making CSF work with OpenVPN
This guide will assume you have both Config Server Firewall (CSF) and OpenVPN already installed and working individually. To make CSF work with OpenVPN, you’ll need to create extra iptable rules. We do that by adding them to csfpre.sh. nano /etc/csf/csfpre.sh If the file does not exist, you can create it. If it already exists,…
-
Changing Limits for Services with CentOS 7 / RHEL 7 / Systemd
Hitting too many open file limit for apache? In the previous OS versions, changing limits like open file number would be set in /etc/security/limits.conf or directly inside the start up script. In some ways the new method brings better organization to the limits, but its change is very confusing to people who were expecting the…
-
Allowing stuff on SELinux (NewRelic example | For CentOS/RHEL 5/6/7)
Ah… selinux, always getting in the way of things… SELinux doesn’t necessarily have all the proper rules, so often you’d need to adjust it yourself. This is a tutorial of how to do that with NewRelic as an example (which I just had problem with after updating…). You can replace “newrelic” and “newrelic-daemon” to your…
-
Installing Software RAID on Centos 5/6/7 via SSH
Considering number of dedicated server rentals that just gives JBOD, setting up your own software raid is quite handy. This tutorial goes over the very basic of how it’s done. All of this should be done under root. Let’s say you have 3 disks: sda, sdb & sdc. The OS is mounted on the sda, so…
-
Sphinx Search & Invision Power Board
I just finished tweaking Sphinx (and bunch of other stuff) for a client and sphinx was being terrible with full indexing! So bad on the first time that it brought the site down for a good 15 minutes and maybe another half hour of crawling speeds on the first run. This client’s db is bigger than…
-
Webservers & Caches
I’m a graph-diagram-table person. And when someone asks how web servers and caches are mixed, I now have an image to give them! Now we can visually see how web server interacts with a page cache in apache, nginx & varnish. And how user cache and opcache for PHP are separated by services like…
-
Installing the latest PHP (5.4.23 / 5.5.7) on CentOS/RHEL
Method 1 – Remi Repo The Remi Repository (famillecollet.com) maintains the newest PHP for CentOS, RHEL, etc. And by newest, I mean newer than all other major repos. All you need to do is install PHP with Remi enabled. As of writing this article, Remi has 5.4.23 for CentOS, RHEL, etc. If you want even…