Non multa, sed multum!

Now with octopress.

My Fifteen Minutes of Glory.

| Comments

For 15 minutes or so, my blog was 1st in the google search results by “Zend Server 4.0” keyword, even zend.com — 2nd.
:)


WhatSize in Bash (Fast and Dirty)

| Comments

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

if [ "$1" = "" ]; then
  listlength=10
else
  listlength=$1
fi
du -s * | sort -rn | head -n $listlength \
| sed s/^[0-9]*// | while read item
do 
  if [ "$item" = "" ]; then
      continue
  fi
  echo `du -hs "$item"`
done

Tested on Mac OS X and Ubuntu.

Mac OS X Ramdisk

| Comments

#!/usr/bin/env bash

if [[ $1 == "" ]]; then
mb=409600 # 200 MB
else
((mb=2048*$1))
fi

diskutil erasevolume HFS+ "ramdisk" \
`hdiutil attach -nomount ram://$mb`