The Zend OPcache is a caching system that seeks to improve PHP performance by keeping precompiled PHP code in the shared memory of your web server. Since PHP is an interpreted language that has to be compiled into a set of intermediate instructions (“opcodes”) when someone accesses your PHP page or site, not having to […]
Author: Geoff Stratton
WordPress: Installation and Performance
This article describes some of the basics on installing and running WordPress to maximize its performance. The following scripts and text generally assume Debian/Ubuntu, so substitute Red Hat, Arch, etc. as needed. Installation If you’re less lazy than I am, you could combine the whole install routine into a single Bash script, and make it […]
Stupid SQL Tricks
Joins This intends to provide a brief summary of JOIN operations. I’m attempting to follow standard SQL here where possible, thus avoiding, say, Oracle terminology like ANTIJOIN and SEMIJOIN. All SQL databases that I’ve encountered perform LEFT/RIGHT/INNER JOIN as expected, but others will show some variation. When in doubt, refer to your documentation. The generic […]
nmap
nmap is a security scanner capable of mapping topology, discovering hosts, determining OS and device profiles, examining individual services, and exposing vulnerabilities across networks. It’s licensed under the GPL and binaries are available for most platforms. A graphical frontend called Zenmap is available in most Linux repos. More specifically, nmap sends ICMP Echo (type 0), […]
mtr
mtr combines the behavior of the ping and traceroute utilities: it traces a route path between localhost and a destination device or computer, showing you a list of the routers between them as well as the average round-trip times and packet loss to each router. To do this mtr utilizes ICMP Type 0 and 11 […]
wget and cURL
wget wget is a GNU utility for retrieving files over the web using the popular internet transfer protocols (HTTP, HTTPS, FTP). It’s useful either for obtaining individual files or mirroring entire web sites, as it can convert absolute links in downloaded documents to relative links. The GNU wget manual is the definitive resource. Some Useful […]
SMART Disk Diagnosis
SMART is a monitoring system, included in most modern hard disks, that attempts to diagnose disk health and predict impending drive failure. The smartctl/smartd utility of smartmontools is the standard for Linux/Unix and versions of it are available for Windows as well. DiskCheckup also seems to be a good utility for Windows. Many modern controller […]
Quick Setup Notes for Debian
Some quick setup notes for Debian 8 (“Lennie”). Add yourself to the sudoers group: Set up unattended security updates: (Select ‘yes’ to the ‘Automatically download’ question.) Install all tools for dev/package builds: (Alternatively, installing build-essentials will give you all standard c/c++/make/dpkg libraries, although not the kernel headers.) “Permission denied” CD-ROM error: Optical drives and network […]
SATA Disk Inspection and Troubleshooting
The purpose of this page is to list some tools for SATA disk or device troubleshooting on Unix-like operating systems. Serial ATA is specified by the SATA International Organization; the most current revision as of October 2015 is SATA 3.2, released August 2013. Intel specifies the Advanced Host Controller Interface; as of October 2015 the […]
Drupal: Programmatically Create a Block
So you want to add a block to your module in Drupal 7. First, define its internal name and human-readable title (for the Blocks UI) with hook_block_info(): Then, give it the permissions needed to view it, a title (to appear for your site visitors), and some content with hook_block_view(): If you want to give the […]