Skip to content
Zcentric

The old blog

Posts

Notes on iPhone development, Linux, Django and infrastructure, written between 2008 and 2016.

  1. Simple script to selectively remove emails from postfix’s queue

    Tweet If you send out a lot of emails, the queue in postfix might be full of junk emails from people putting like bla@example.net as their email address. Now there could be other valid emails in there that you …

  2. Nagios check for monit

    Tweet Here is a simple nagios check I just created to check the monitor status for monit. The background is as simple as this.. If you have a service that is flapping and monit is set to timeout after a number of failed …

  3. Mapping /proc/meminfo to output of free command

    Tweet So an example output of free is total used free shared buffers cached Mem: <span style="color: #039b3d">12333980</span> 12151544 182436 0 <span style="color: #06e572">233128</span> <span …

  4. Varnish ACL with X-Forwarded-For Header

    Tweet So I did a setup like this once nginx -> varnish -> backend apaches I did the nginx in front of varnish to handle SSL termination since varnish doesn’t do SSL. So the issue is you can do this for …

  5. Postfix ignore catchall relayhost

    Tweet Postfix has an option where you can setup a relayhost to send all mail to another mail server. It looks something like relayhost = [mail.domain.com]:25 So that will send all mail being sent out from the server to …

  6. ps aux with line wrap

    Tweet File this under you learn something new every day. Ever do a ps aux only to get something like this to happen? xymon 26931 0.0 0.0 38944 1396 ? S 05:44 0:00 sh -c vmstat 300 2 1>/usr/lib64/xymon/client/tmp/hob …

  7. Fabric Shell

    Tweet I recently wrote a quick little fabric function to create a fabric shell. This works with a stock fabric install, you just might have to change where you import it from. It is at my Github page below. …

  8. Fun with Django ManyToMany Fields

    Tweet This is just another reason I find Django so easy. For example.. Say you are making a monitoring application. Now you have a bunch of servers and you have certain groups of servers. A server can belong in more …

  9. Crontab with a random sleep

    Tweet Recently ran into this problem. We had a crontab entry that looked something like this 0 0 * * * /usr/bin/sleep $((RANDOM\%90)); cmdHere What that attempted was to run a command a random amount of seconds once …

  10. Atomic Symlink Changes

    Tweet A common deploy strategy for a lot of web sites is as follows v1.0.10 v1.0.11 v1.1.0 current -> v1.1.0 So in this directory we have three directories and one symlink. The directories contain our web application …

Browse by tag or category, or go back to all posts.