Constant Thinking

Posts tagged "hacking"

6 posts
mandelbrot.jpg

How to Render the Mandelbrot Set in the Joyent Cloud With Node.js

Obsolete | In General
| 13 minute read

First of all: Apologies for not posting for a long time. The reason? I was having too much fun with node.js and the Joyent Cloud :).

What started as a small experimental hack turned quickly into an exciting new pet project involving the good old Mandelbrot Set, as a web service, running in the Joyent cloud, programmed in node.js.

But first things first: Let’s take a look at node.js as a language and programming model, at the Joyent Cloud and how it relates to Solaris and finally some details on how the picture you see was rendered inside the Joyent Cloud, including an interactive Mandelbrot Set explorer you can play with now, written as a web app.

4 commands that help you find bottlenecks

My Favorite Oracle Solaris Performance Analysis Commands

Obsolete | In Solaris
| 16 minute read

A while ago, we discussed some performance analysis basics:

  • Define what your problem is.

  • Figure out your goal: What metric needs to be in what ballpark for you to declare victory?

  • Analyze your system from the inside out: CPU, RAM, Disk, Network. Your Bottleneck is always in one of these 4 regions.

So what are the best commands for finding bottlenecks in each of the four categories above? Here’s part two of my Oracle Solaris Performance cheat sheet with some favorite tricks.

drupalhtml5.jpg

How to Easily Add HTML5 YouTube Videos to Your Drupal Site

Obsolete | In Drupal
| 4 minute read

For my last article, I wanted to include a couple of videos from YouTube.

First, I pondered using the standard YouTube embed code, but I wanted a more simple, elegant solution. The Drupal RepTags module supports powerful macros and it comes with some pre-built YouTube macros, so that wasn’t bad.

But I wanted more: HTML5. Read on and see how easily you can create your own Drupal RepTags, including the code I use to add HTML5 support for the Drupal YouTube RepTag.

zfscode.jpg

ZFS Is for 1337 Hax0rz

| In Solaris
| 4 minute read

The developers of ZFS are a funny bunch of people. You can tell that by watching the “ZFS: The Next Word” talk, meeting them on conferences, reading their blogs or their comments on mailing lists.

And there are also some funny parts in the ZFS source code, too. In fact, if you use ZFS, you’ll have a funny joke sitting on your disk, right under your nose!

I was reminded about this particular joke while listening to Ulrich Gräf’s excellent talk on ZFS internal data structures during OSDevCon 2009 (no link, osdevcon.org no longer exists) (watch a video of Ulrich’s talk here (no link, sun.com no longer exists)).

But first, we need to dig a little bit into the world of ZFS data structures.

Power Management Scripting

OpenSolaris Home Server Scripting 2: Setting Up Power Management

Obsolete | In Home Server
| 9 minute read

Last week, we looked at how essential scripting is for administering home servers (one of the 7 tips for home server bliss) and we wrote us a little script for enabling automatic snapshots.

Another thing that you’ll almost certainly want to do on your OpenSolaris home server is enabling power management. This will ensure your server spends as little power as possible when idle, while still being powerful when needed.

ScriptingHomeserver.jpg

OpenSolaris Home Server Scripting Howto Part One: Intro and a Simple ZFS Auto-Snapshot Enabling Script

Obsolete | In Home Server
| 12 minute read

One of my OpenSolaris Home Server Tips is to script everything. That triggered quite some interest. So let’s start a short series around OpenSolaris home server scripting.

Today, we’ll talk a little bit about the “why?” of home server scripting, then run into a small surprise while we write a small script that will enable/disable the OpenSolaris ZFS Auto-Snapshot Service for us.