Using Tmux & Cygwin together is the best console combination on Windows, if you ask me. I’ve been using this setup for over a year now, and my productivity is measurably better, my workspace more organized, and it looks cool to boot! I’ve also converted most of the developers at my workplace to this setup. […]
Linux
How Linux pipes work under the hood
Piping is one of the core concepts of Linux & Unix based operating systems. Pipes allow you to chain together commands in a very elegant way, passing output from one program to the input of another to get a desired end result. Here’s a simple example of piping: ls -la | sort | less The […]
Understanding how Linux creates processes
A friend recently read my post on how bash redirection works, but didn’t quite understand my explanation of how bash launches another process and sets stdin/stdout/stderr, so this is a follow up post. Linux creates every process using the fork(2) or clone(2) syscalls. The only way to create a process is to fork your current […]
So what is /proc anyways?
I’ve been using Linux for years, but I’ve never really known was /proc was or why certain commands used it. I’m not sure why I’ve never looked it up in the past, but I recently did and I thought I’d share. /proc isn’t a “real” directory, in the sense that it doesn’t exist on disk. […]
How bash redirection works under the hood
Have you ever wondered how bash redirection works under the hood? Redirection itself is pretty straightforward. Using bash, you can redirect a file to a process’ stdin, or redirect a process’ stdout/stderr to a file or other file descriptor (including things like redirecting stderr to stdout, because both are file descriptors). Redirection looks like this: […]
Configure Nagios To Use Sendmail
I’ve been setting up Nagios for a client of mine, and one of the issues I faced was configuring Nagios to use sendmail to send notifications. It was attempting to use /bin/mail or /usr/bin/mailx to send email, neither of which were present on the CentOS box. There wasn’t any information when I Google’d it, so […]
LAMP Server Setup Pt. 2
Mod_Security is a great module for Apache 2 which adds many new security features and fixes a number of exploits. It’s also quite easy to install. Installation Requirements ModSecurity 2.x works only with Apache 2.0.x or higher. Version 2.2.x is highly recommended Make sure you have mod_unique_id installed mod_unique_id is packaged with Apache httpd libapr […]
LAMP Server Setup Pt. 1
I’ve decided to write a “simple” guide to installing Apache with mod_security, mod_chroot and mod_ssl, PHP with suhosin and common addons, and MySQL. The common LAMP server with a few security modifications 🙂 This will be unique in that we are installing everything in the /opt directory, mainly to make updating/removing super easy. No trying […]
Linux – Resize a directory of pictures
In Linux, resizing a large amount of pictures is very simple. This is a neat little command line script perfect for making thumbnails to go on websites or what not, and I’ve used it in some PHP websites before. for i in *.jpg; do convert -resize 640×480! -quality 75 “$i” thumb/”$i”; done The script shouldn’t […]
Checking for root kits
“A root kit is one variety of hacker tool kit. It can perform a number of functions depending on the flavor of the root kit. The original core of most root kit applications was some kind of network-sniffing tool designed to allow the attacker to find additional usernames and passwords. More recently, these functions have […]