Blogs

Yes 4G + Asterisk + FreePBX = VoIP heaven

Short how-to to have Asterisk handle Yes 4G - both as outgoing trunk and incoming. Tested under CentOS 5.7, Asterisk 1.8.7.0.

You will need access to Yes Life iOS app (or any IP traffic analyzer if you are using Yes Life for Windows), and know how to build Asterisk from source.

1. Figure out your Yes authorization name and SIP server. Your Yes ID is different from your Yes authorization name. To find out your authorization, launch Yes Life for iOS. Go to "More" tab and tap on "System Log". Swipe the "ON" button to turn on Yes Life logging.

Enable TRIM support for SSD under Mac OS X Lion

YOUR ARE ON YOUR OWN. DO NOT ASK FOR HELP FROM ANYONE!!

1. Patch IOAHCIFamily kernel extensions.

sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x51)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

2. Rebuild kernel caches.

Crude way to measure disk speed

Simple script to crudely measure disk speed. Take file name and test file size as argument - e.g.

./bench /tmp/test 2048 # create 2GB test file /tmp/test

#!/bin/bash
if [ $# -lt 2 ] ; then
echo Usage: ./bench FILE_NAME SIZE_IN_MB
exit 1
fi

sync
echo 3 > /proc/sys/vm/drop_caches
dd if=/dev/zero of=$1 bs=1M count=$2 oflag=direct 
sync
echo 3 > /proc/sys/vm/drop_caches
dd if=$1 of=/dev/null bs=1M count=$2 iflag=direct
rm -rf $1

Starting with SQLite

SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. The primary benefits of using SQLite is that you can create a self-contained database in your application.

What is so great about this? Well, for starters you can:

  • Manipulate data inside your program using standard SQL construct.

  • Zero database configuration – but you get database-like capabilities for your program.

Accelerate Plone with Varnish

Introduction

This tutorial highlight the necessary steps to configure Varnish and lighttpd to serve your Plone site. The primary benefit is that you can tremendously improve performance of your Plone. In Bitubique.com case, the stock Plone installation was only able to push up to 13 requests per seconds, but putting Varnish and lighttpd in front push the performance up to 160 requests per seconds. That's 12 times faster than stock installation!

Which RBL do you use?

List of reliable RBL that we use internally and recommend to our customers.

Here goes:

  • zen.spamhaus.org
  • bl.spamcop.net
  • combined.njabl.org
  • cbl.abuseat.org
  • combined.rbl.msrbl.net
  • psbl.surriel.com
  • b.barracudacentral.org

With these RBL, combined with greylisting and a good SpamAssassin ruleset, out of combined 50,000 - 55,000 incoming email attempts daily on all SMTP servers that we monitor, only 0.05% of spam managed pass through. Pretty good!

How to enable Time Machine to backup to network disk

Easy. Just follow these steps:

 sudo defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
  1. Obviously you need another Mac to which you want to backup to, with the disk formatted as Mac OS Extended Journaled.
  2. Open Terminal from Mac you want to backup from. Issue command
  3. Open System Preferences → Time Machine. Click Change Disk. Your network disk should appear now.
  4. Select it, and you are good to go.

Defragment XFS File-system

I have been using XFS file-system for all my Linux box for quite some time now. XFS have some fancy features such as live file-system defragmenting. Let's cover how to do that.

First, make sure you have the xfsdump utilities install. For Ubuntu or its derivatives distribution, simply issue this command:

sudo apt-get install xfsdump

Then, optionally you can check how fragmented your file-system is by this command:

Installing and configuring FireHOL

Linux / Network: Beginners guide to FireHOL.

NOTE: Content of this tutorial is probably outdated.

Part 1

Having firewall is one of the steps you can take to make sure that you machine is a little bit secure. This is achieved by opening access only to application or ports that you explicitly allow, and blocking the rest. This for me is a good practice, although some people might argue otherwise.

Port forwarding using xinetd

Edit or create /etc/xinet.d/yourservicename

E.g. to listen to 443 and redirect to 192.168.2.1 port 22, replace listenport = 443, targetip = 192.168.2.1, targetport = 22.

service yourservicename
{
        disable         = no
        type            = UNLISTED
        socket_type     = stream
        protocol        = tcp
        user            = nobody
        wait            = no
        redirect        = targetip targetport
        port            = listenport
}

10.8GHz CPU

10.8GHz CPU. Marketing spin at its best. For the record, in 2010, the fastest stock CPU that is commercially available is rated around 3.8GHz.

Captured from some site selling VPS, which shall remain nameless.

Working config for nginx + Drupal + Boost

Self-notes...after spending a few hours researching and benchmarking various configurations. Apache is so old news.

Setup:

  • Ubuntu Lucid Lynx (10.04)
  • nginx as frontend webserver
  • Drupal served using fastcgi to phpcgi
  • ...and Drupal's Boost module.

Most of these configs is gathered from http://groups.drupal.org/node/26363.

How fast is it now? How about almost 6,000 requests/sec, with throughput around 240Mbps? Fast enough?

Why Google Translate is not ready for Bahasa Melayu

Original English article:

 

The notations for member activity are a quick visual measure of how engaged your subscribers are. You can segment on your member rating to send to your most engaged, or your least engaged if you want to bring them back in, etc

1 Star - negative rating, this person has unsubscribe and resubscribed, or soft bounced in the past

2 Star - no activity, never opened or clicked, most likely a new member, neutral rating

How to fix "VMware Workstation was unable to claim the device (No such file or directory)"

I'm running Ubuntu 7.10 using custom 2.6.23.11 kernel. Somehow, starting from kernel 2.6.23, VMware was unable to properly use my Windows Mobile PDA (Atom O2 Life). Every time I plugged in the Atom, VMware will spurt out "VMware Workstation was unable to claim the device" message. The issue was actually with VMware, and not the kernel. Follow the steps outlined below to work around this bug in VMware.

Recovering from stuck modifier keys caused by VMWare

I use VMware a lot, mostly using VMware Workstation 6.0.2 under Linux host. However, from to time, some or all of the modifier keys (Ctrl, Shift, and Alt) somehow ceased to function. Seemed that sometime VMware failed to correctly restore those keys function to X server.

Here's simple command, using xmodmap (installed as part of X base utilities) that will fix this issue. xmodmap is assumed to be located at /usr/bin