Category Archives: Tech Stuff

Boot Camp – Run Windows On Mac (Without Hacking)

Apple made a excellent move today and announced the beta for a new Boot Camp utility. This lets you run Windows natively on the new Intel Macs without needing to come up with special hacks to trick old school OSes that need BIOS instead of EFI (and also includes all necessary Windows drivers in one place).

Another really handy thing is the utility it comes with to create/resize partitions without loosing any data from the existing ones (no format needed).

Apple is a hardware company primarily, so they still get to sell the hardware… and in the course of doing so, plenty of people will switch to OS X because it might be their first (incidental) exposure to it (if they bought the machine to run Windows).

Windows running on a Mac is like Windows running on a PC. That means itÒ€ℒll be subject to the same attacks that plague the Windows world.

//www.apple.com/macosx/bootcamp/

Update

Even if it didn’t make more people buy Macs (which certainly won’t be the case), Apple’s just gained more than $5.1B in market cap after the announcement. That should cover their development costs. πŸ™‚

Installing APC On BSD Variants

Alternative PHP Cache is a PHP caching mechanism (like Turck mmCache, eAccelerator, etc.) that is being developed directly by PHP developers. In fact, PHP 6.0 is going to include APC Cache in it’s core framework, so it’s certainly something PHP developers/admins should start looking at.

Anyway, if you install APC Cache and Apache fails to start afterwards, check your Apache error log to see if you get something like this:

[Thu Mar 23 15:18:28 2006] [apc-error] apc_shm_create: shmget(0, 67108864,914) failed: Invalid argument. It is possible that the chosen SHM segment size is higher than the operation system allows. Linux has usually a default limit of 32MB per segment.
PHP Warning: Unknown(): Unable to load dynamic library './/usr/local/lib/php/apc.so' - (null) in Unknown on line 0

Most BSD variants (including Mac OS X Server in my case) don’t allow much shared memory to be allocated by default. Lucky, it’s an easy fix…

My OS had a default allowance of 4MB max for shared memory. You can alter that by adding this to your /etc/sysctl.conf file (or creating it if it doesn’t exist):

My new /etc/sysctl.conf file…

kern.sysv.shmmax=134217728
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
kern.sysv.shmall=32768

shmall should be shmmax/4096

So the above config will let you use up to 128MB for shared memory.

You can’t dynamically set the shared memory kernel variables with the sysctl command because once it’s set, it can’t be altered. Because of that, you must reboot your server after you edit the sysctl.conf file…

Update

I just realized that *only* editing sysctl.conf works on Mac OS X. For Mac OS X Server, you need to comment out the kern.sysv.shm* lines in /etc/rc (in Mac OS X Server those commands are called before sysctl.conf is read for some reason).

Google Not Interpreting robots.txt Consistently

I had an issue where Googlebot was spidering parts of my site that were not allowed in the robots.txt file…

My old robots.txt file…

User-agent: *
Disallow: /tools/suggestion/?
Disallow: /search.php
Disallow: /go.php
Disallow: /scripts/
Disallow: /ads/

User-agent: Googlebot
Disallow: /ebay_

Hmmmm… that’s weird… Googlebot is still spidering stuff it shouldn’t be…

www.digitalpoint.com 66.249.66.138 - - [14/Mar/2006:06:21:07 -0800] "GET /ads/ HTTP/1.1" 302 38 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +//www.google.com/bot.html)"
www.digitalpoint.com 66.249.66.138 - - [14/Mar/2006:10:26:18 -0800] "GET /ads/ HTTP/1.1" 302 38 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +//www.google.com/bot.html)"
www.digitalpoint.com 66.249.66.138 - - [14/Mar/2006:14:29:35 -0800] "GET /ads/ HTTP/1.1" 302 38 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +//www.google.com/bot.html)"
www.digitalpoint.com 66.249.66.138 - - [14/Mar/2006:17:47:21 -0800] "GET /ads/ HTTP/1.1" 302 38 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +//www.google.com/bot.html)"

So I made an inquiry to Google about this, and I actually heard back (nice!)…

While we normally don’t review individual sites,
we did examine your robots.txt file. Please be advised that it appears
your Googlebot entry in your robots.txt file is overriding your generic
User-Agent listing. We suggest you alter your robots.txt file by
duplicating the forbidden paths under your Googlebot entry:

User-agent: *
Disallow: /tools/suggestion/?
Disallow: /search.php
Disallow: /go.php
Disallow: /scripts/
Disallow: /ads/

User-agent: Googlebot
Disallow: /ebay_
Disallow: /tools/suggestion/?
Disallow: /search.php
Disallow: /go.php
Disallow: /scripts/
Disallow: /ads/

Once you’ve altered your robots.txt file, Google will find it
automatically after we next crawl your site.

Okay… I can live with that… easy fix. But check this out… Google’s own robots.txt testing tool within Google Sitemaps show the old robots.txt as being able to block Googlebot as expected.

So how about some consistency here? And more importantly, if anyone at Google is reading this, how about someone tell me why my blog is banned in your index… πŸ™‚

Insect Cyborgs

I saw this on Boing Boing this afternoon… it looks like DARPA (Defense Advanced Research Projects Agency) is starting to research the feasibility of engineering insect cyborgs…

Quote from their website

DARPA seeks innovative proposals to develop technology to create insect-cyborgs, possibly enabled by intimately integrating microsystems within insects, during their early stages of metamorphoses. The healing processes from one metamorphic stage to the next stage are expected to yield more reliable bio-electromechanical interface to insects, as compared to adhesively bonded systems to adult insects. Once these platforms are integrated, various microsystem payloads can be mounted on the platforms with the goal of controlling insect locomotion, sense local environment, and scavenge power. Multidisciplinary teams of engineers, physicists, and biologists are expected to work together to develop new technologies utilizing insect biology, while developing foundations for the new field of insect cyborg engineering. The HI-MEMS may also serve as vehicles to conduct research to answer basic questions in biology.

MySQL 5.1 Out Of Alpha

With version 5.1.7, MySQL 5.1 (which is something I’m [not] patiently waiting for) has gone from alpha to beta status.

The stuff I’m really looking forward to is it’s improvements to the NDB Cluster engine…

  • Disk Data tables (before NDB Cluster required everything to be memory-resident)
  • Integration of MySQL Cluster and MySQL replication
  • Variable sized records

Now hurry up through the beta phases! πŸ™‚

The only thing (that I can think of) that MySQL Cluster will be lacking for 5.1 is support for FULLTEXT indexes… not a deal breaker though since you will be able to replicate to a MyISAM to get a FULLTEXT indexed table. Should see it in MySQL 5.2 though (hopefully). Oh, and the ability to alter live tables sure would be nice.

Voice Controlled Blender (Blendie)

Okay, this is kind of odd… this is a blender you scream at to make it work. πŸ™‚ (link to blueprint)

People induce the blender to spin by sounding the sounds of its motor in action. A person may growl low pitch blender-like sounds to get it to spin slow (Blendie pitch and power matches the person) and the person can growl blender-style at higher pitches to speed up Blendie. The experience for the participant is to speak the language of the machine and thus to more deeply understand and connect with the machine. The action may also bring about personal revelations in the participant. The participant empathizes with Blendie and in this new approach to a domestic appliance, a conscious and personally meaningful relationship is facilitated.


//web.media.mit.edu/~monster/blendie/

Dell PowerEdge 1855 Blade Server

I’m looking at the possibility of moving some stuff I’m doing to blade servers. Anyone have any experience with blade servers in general? And if so, now is the time to gimme some input! πŸ™‚

This is what I’ve been looking at lately…

//www1.us.dell.com/content/products/productdetails.aspx/pedge_1855

Then I could just pop in a new blade (computer) when I need more power. A 7U blade chassis will hold 10 blades/computers, so a 7U chassis could hold 40 Xeon processors, 120GB RAM, 2.9TB drive space (15k rpm Ultra 320 SCSI)

Playing Apple DRM Music Outside of iTunes/iPod?

Does anyone have a solution for playing music purchase at the Apple Music Store outside of iTunes or an iPod?

I’m going to be having a central audio distribution system in my house, but I just realized that music I purchase from the Apple Music Store isn’t going to work on anything outside of iTunes/iPod… Lame!

Makes me want to buy old school CDs and rip them instead of buy music electronically.

“True” Video iPod Coming

The rumors have started about Apple releasing a “true” video iPod at the end of March or beginning of April. If the rumors are correct, they will go from a 2.5″ screen (on current iPod’s) to a 3.5″ screen and do away with the click-wheel, and instead use an on-screen touch-panel interface.

Think Secret can confirm recent rumblings that Apple is nearing completion of a completely revamped video iPod that will shed the ubiquitous mechanical click wheel for a touch screen and will sport a 3.5-inch diagonal display.

//www.thinksecret.com/news/0602videoipod.html

Canon VB-C50i/R

I need to get a good pan/tilt/zoom camera for the site of the house construction (to automatically make a time lapse of the house being built and also just to see what’s going on at any given time).

I’ve done a little research on it, and so far the Canon is the best one (for the job) I can come up with… It has good zoom capability (26x optical + 12x digital for a total of 312x zoom), it has a built-in server (no need to connect it to a computer), you can schedule it to take pictures (at a pre-set pan/tilt/zoom) for the time lapsing, has a night mode with an infrared illuminator to see in the dark, etc.

So go test drive it over here, and tell me what you think:

//www.nuspectra.com/vbcam/large.aspx

Or if you know of anything better, please let me know…

Downloadable Conditional Access System (DCAS)

There has been a bunch of hoopla lately about CableCARDs finally coming to market this summer, so I decided to read about it a little more…

The CableCARD system basically lets you insert a PCMCIA card into your TV and then you don’t need a digital cable box to receive high definition signals. The CableCARDs are going to let things like digital video recorders work for high-def signals (TiVO, Windows Media Center, etc.) Anyway, after poking around the web on it, I realized that the whole CableCARD system is already obsolete and it hasn’t even been released yet. CableCARD 2.0 is going to follow about a a year later which will allow bi-directional data (you will have to wait for 2.0 for things like Pay Per View). But the really lame part is existing CableCARD TVs aren’t going to work with 2.0 CableCARDs (so you already need to buy a new TV… even if you have one that supports CableCARDs).

Then probably a year after CableCARD 2.0, cable companies are going to start switching to Downloadable Conditional Access Systems (DCAS). This will be much better than CableCARD (even 2.0) because it’s essentially a CableCARD that is downloaded automatically from your provider (no need to rent a CableCARD for each TV then).

I can’t imagine anyone reading this actually cares about any of this… but I don’t care. It’s more for my own archive purposes so I can look it up later, so piss off! πŸ™‚

If you *do* actually care, here’s some reading for you…

//arstechnica.com/guides/other/cablecard.ars

Prevent DoS Attacks Via DNS (BIND)

A malformed UDP packet to your DNS server can cause it to respond to an IP address that never made the request (with the response being being more bytes than the request). So someone malicious could use one of your name servers to throw unwanted traffic at a 3rd IP address. Annoying… but pretty easy to solve. You can setup BIND to only answer DNS queries that it’s authoritative for except for specific blocks of IPs which it will do recursive lookups for (basically internal IPs that could use the DNS server as it’s name server for lookups).

Besides your server becoming part of a DoS attack, it can suck a ton of your own bandwidth (I was seeing cases where short-lived attacks were saturating 3Mbit worth of my bandwidth). Not any more! πŸ™‚ I figured out what was causing the bandwidth spikes with my friend, tcpdump.

I’m too tired to get into more details (that’s what Google is good for), but you can basically add something along these lines to your /etc/named.conf file:

allow-recursion {192.168.1.0/24; 216.9.35.0/24;};

That will ignore DNS requests from any IP (except those 2 subnets) when the IP makes a request about any domain that the DNS server not an authoritative server for.

tcpdump

If you ever need to figure out what is eating bandwidth on a server, tcpdump comes in handy…

tcpdump -n -i any

That will spew out everything, so you might be able to find anything that looks suspicious in there. Say you find the IP address of 1.2.3.4 doing something suspicious, you can zero in on them to see if they are doing anything naughty like so:

tcpdump -n -i any host 1.2.3.4

In my case, someone was utilizing one of my DNS servers for about 200 lookups per second (not logging DNS lookups and it’s UDP traffic so it was hard to figure out where the bandwidth was going).

Once you find a naughty IP address, now just block them like so:

route add -host 1.2.3.4 reject (Linux)

or

route add -host 1.2.3.4 255.255.255.255 -reject (Mac OS X/BSD)

Central Audio/Video Distribution

Okay, I finally sat down tonight and figured out what I *think* I need (at least it’s a start so the experts have something to start with) to do centrally distributed audio/video for the house.

Audio

So I’m thinking every room (minus bathrooms, except for master) should be an audio “zone” as well as the pool house and then 3 zones for audio outside (front yard, back yard and golf area). That works out to 20 audio zones. Three of those should be 7.1 surround (living room, home theatre and master bedroom) with everything else being 2 channel stereo. So after figuring that out, now what in the hell sort of equipment do I need to make all this work? Maybe this (this is all Crestron stuff)…

  • CNX-BIPAD8 (3 of them) – CAT5 24×8 distributor (24 possible sources in, 8 rooms out) any room could be on any source so 3 of these will cover 24 “rooms/zones”
  • CNAMPX-16X60 (2 of them) – 16 channels x 60 watts each (8 rooms per amp, 16 rooms total)
  • CNAMPX-2X60 (1 of them) – 2 channels x 60 watts each (1 room)
  • CNAMPX-7×200 (3 of them) – 7 channel x 200 watts surround sound amp (3 of them for the 3 rooms I want 7.1 in)
  • C2N-DAP8 (3 of them) – 7.1 surround sound processor
  • AAS-4 – Digital Audio Server (250GB of MP3s, able to output 4 independent streams as sources to the distributors)
  • CEN-IPOD – iPod dock

So in the end what would that give me? I would have the ability to pipe any of the 5 sources (4 unique streams of MP3 and music from an iPod) to any specific zone, plus with the ability to hook up 11 additional sources, you could pick up the audio output of a computer for example and use it as another source.

Video

So this is where it gets even more complicated. I want all TVs to be running digital signals (HDMI/HDCP) where possible. Unfortunately it doesn’t look like Crestron has any equipment to run HDMI signals. Another problem is the HDMI signals are going to be coming from the server room, so you start to run into a cable length issue. So… enter Gefen.

  • EXT-HDMI-444 (2 of them) – 4×4 HDMI switch (4 sources switchable between 4 outputs. 2 of them should give 4 sources switchable between 8 outputs)
  • EXT-HDMI-244 (2 of them) – 2×4 HDMI splitter (2 sources switchable between 4 outputs. Need this to split the 4 master sources to the 2 4×4 switchers.)
  • EXT-HDMI-1000HD150B (3 of them) – 150′ HDMI fiber extender
  • EXT-HDMI-1000HD100B (4 of them) – 100′ HDMI fiber extender

The lengths are just guesses, but that setup would let me run HDMI signals over fiber at full 1080p resolutions (1920×1080).

What would really simplify this would be if there was a 4×8 HDMI switcher available. But I couldn’t find a company that offers a HDMI switcher/matix except for Gefen. I didn’t even attempt to go digging for a dual link (Type B) HDMI switcher. hehe

At least this gives me something to start with when dealing with the home automation guys… now I don’t have to meet when them and just be like, “Duuuuhhhhhhh… I don’t know what I want/need.”

It also made me realize I want conduit running to every place a TV could be.

Wearable Video iPod Screen

eMagin is making a wearable iPod video screen. Apparently they didn’t realize iPods are more about their “cool factor” than anything else… But for those that want to walk around town looking like the borg, now you can! πŸ™‚

“Suddenly you’ve got this big-screen, movie-screen, home-theater experience, wherever you are,” said Gary Jones, eMagin’s president and CEO.

I Need To Be More Dorky

I just realized that it’s been weeks since I had something dorky to say (like programming or something to do with MySQL for example).

Just so you know that I am still dorky, here’s some PHP code for you (from my post over here)…

This will put the keywords that someone searched on to reach your site (works with Yahoo, AOL, MSN and Google) into the $keywords variable.

[code=php]$parse = parse_url($_SERVER[‘HTTP_REFERER’]);
$se = $parse[“host”];
$raw_var = explode(“&”, $parse[“query”] );
foreach ($raw_var as $one_var) {
$raw = explode(“=”, $one_var);
$var[$raw[0]] = urldecode ($raw[1]);
}
$se = explode (“.”, $se);
switch ($se[1]) {
case ‘yahoo’:
$keywords = $var[‘p’];
break;
case ‘aol’:
$keywords = $var[‘query’];
break;
default:
$keywords = $var[‘q’];
}
unset($parse, $se, $raw_var, $one_var, $var);[/code]

Weeeeeeeeeee! Can I go to bed now?

Brett Tabke Blog/Commodore 64 Stuff

For the uber geek (hey, that’s me), having a blog in your robots.txt is a pretty fun idea.

//www.webmasterworld.com/robots.txt

It’s a nice minimalist approach to content that I personally like. It’s like a throwback to .plan or if you want to go even further back the days of C=64 boards (as Brett mentions). I myself ran a C*Base board.

This Commodore talk made me feel nostalgic and I *almost* unpacked my Commodore and CMD hard drive and fired up Dream Park (my old BBS) just to play around with it. But uhm, then I didn’t. πŸ™‚

Instead, I Googled around to see if there were any references to me and my board on the Internet. And I found some…

Driven Issue #9 (now I just need to find a reader for this thing). I think I had lots of crap in the Propaganda disk mag too, but I can’t find that online.

Those days were definitely the most fun I had coding. When computers had limited resources you certainly had to be creative to do things. For example I pretty much rewrote the C*Base software to be 100% memory resident. Leaving enough free memory for variables and other crap, that means the BBS software itself was pruned down to about 35k (that included users, voting, message boards, file upload/downloads, etc.) Or how I ran the board on a Commodore 128 (but in 64 mode) so I could tap the 2Mhz processor of the 128 vs. the 1Mhz processor on the “normal” 64. Ahhhh… the good ol’ days. πŸ™‚

– Cyborg/F4CG+Avantgarde+Genesis
Update

I found a Commodore 64 emulator for Mac OS X, and loaded up Driven #9. Amazing what a dork I was (am??). Here’s one of the pages from my “interview”…

Google Is My Friend

Yesterday, if someone asked me if I was friends with Google, I would have said, “Nah, we are just acquaintances… you know, “hi”, “bye” if we see each other at lunch or something.”

But today that all changed. Not only did Google send me a Christmas present (cool stuff too… 128MB USB drive, USB hub, wireless mouse, headphones with a mic, USB torch, and some other stuff), but it came in a package that clearly says, From your friends at Google.

Now that’s saying something… not only do I have *a* friend at Google, I have more than one. Damn I’m popular!

MySQL Memory Fragmentation

Okay, I *thought* it wasn’t a problem (at the time), but it turns out, it just made it “less” of a problem.

After watching the server closely for a month or two I think I finally figured out what the hell is going on. mysqld is not really efficient with it’s memory (I finally figured it out with vmmap). To the point that I start getting 10,000+ different memory segments for mysqld after about 24 hours of use. On a server that has many gigs of unused/free memory (with MySQL only using about 200MB), that’s pretty sucky memory management if you ask me.

That explains why it gets slower and slower over time and also explains why pretty much removing the query cache (memory) made it less of a problem.

I opened a bug report with MySQL about it, so *hopefully* we can finally get it taken care of and I don’t have to restart the mysqld daemon every 24-48 hours.