Archive for the ‘Uncategorized’ Category
That’s A Really Really Long Time
So I swung by a video game store during lunch today, and I see this kid in there not talking, not acknowledging anyone, playing his Nintendo DS, while his Dad was buying him a video game. The kid’s like 8 or something. Walks out, doesn’t look up.
Anyway, after he leaves, I joke with the clerk “wow, playing video games and can’t even pay attention to the video game store”.
Clerk responds “That’s a Hooosoowhoooshy, they only come out every one million years, he’s got to catch it”. (I gather that’s something like a Magic Morphing Pokemon Turtle or something).
I respond “A million years? That’s a really long time to be playing a video game”.
Clerk doesn’t quite get it.
Application To Magnum
Short photo walk today.
Here’s my gritty approach to War Journalism, as applied to the Traffic Cone Genre:
You may also like such highly exciting works as: Un Zona De Protection Para Arboles, Random Sidewalk Markings, My Favorite Neighborhood Fire Hydrant, and Some Not Quite So Well Painted Lane Markings.
Or you might not.
Photos From Manhattan
A business trip to visit several Puppet users and the nylug in New York gave me some time Monday to walk around Manhattan, which I’d never been to before. A great city, no doubt. Nice restaurants, architecture, and amazingly like TV. I had a great time talking with everyone (as well as seeing the city), and I’ll definitely be back.
Click through the above to see a few photos, the first several from Rockefeller Center. I only had the Panasonic with me… I really could have used the SLR.
x.org configuration for Dell 24″ Ultrasharp + Ubuntu 9.10
In case this proves useful, the following works for me:
Section "ServerFlags"
Option "DontZap" "false"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "DELL U2410"
DefaultDepth 24
SubSection "Display"
Depth 24
Virtual 3200 2000
Modes "1900x1200" "1600x1200" "1280x1024" "1152x864" "1024x768" "800x600" "720x400" "640x480"
EndSubSection
EndSection
Section "Module"
Load "glx"
EndSection
Section "Device"
Identifier "Default Device"
Driver "fglrx"
EndSection
It seems like the proprietary driver (and not using the built-in Intel card) is necessary on my laptop. However, go-go-gadget Display Port.
Shine On You Crazy Tunnel
The Frogger
Ground Kontrol has an excellent collection including the vector graphics Star Wars (wow, first time seeing one of these, fantastic), Asteroids, Missile Command, Frogger, Turbo Ms. Pacman, Galaga, Discs of Tron (my personal favorite), and some “newer” stuff I remember feeding many quarters into when I was growing up — Sunset Riders, X-Men, etc. Missed some of my racing/driving favorites like Pole Position, Bump N Jump, Stun Runner, Spy Hunter, Out Run, etc. They did have a most excellent selection of pinball tables, more than I’ve seen in one place, even “back in the day”. Pinball tables eat quarters FAST. Did I mention they have beer (and special holders for them?).
The New Yardbirds?
Awesomeness via Make
Another Gource Video: Func
As a follow up to my previous post, here’s a video from Func’s source control history, from conception until today. It differs a fair amount from Cobbler, mainly because commit attribution was preserved early on (due to using git am and related tools).
VirtualBox & Wireless
I’ve arrived at a fairly nice home virtual machine developer setup, that no longer cares whether I am docked or undocked. VirtualBox can set up a bridge around wlan0 by using the GUI — no manual setup, and it can also bridge wlan0. AFAIK, Virt Manager can still do neither of these things, though perhaps if you edit the libvirt XML and dnsmasq configurations you could get close. Further, the newly created bridges do not cause problems with NetworkManager or Firefox (as I’ve had happen in Fedora numerous times).
What I have:
- Virtual machines are set up to be bridged on wlan0
- Virtual machines are configured statically, i.e. 192.168.1.150+N (outside the DHCP range of the router), gateway=router_ip, dns=host_ip
- Host runs dnsmasq with each machine in /etc/hosts
(For purposes of full disclosure, this is on Ubuntu 9.10)
I would like to be using virt-manager and supporting my former Fedora cohorts instead, but this setup is way too portable and awesome. I’m also running on a Dual 3GHz system with 8GB of RAM, and … for some reason, VirtualBox seems faster (even with /dev/kvm present) and the graphics are also much better.
Anyway, I’m pleasantly surprised by this being as manageable as it is for a bridged setup.
I’d like it to be even easier, but I realize virtual machines outside of NAT are largely a server use case, so much more than that would probably be overkill — and server folk can handle it. I still can’t help but wonder what would happen if Virt-Manager was as usable as Virtual Box, and Virtual Box had Virt-Manager’s dnsmasq (with dynamic DNS so hostnames just worked everywhere) and also added a UI to configure it.
An aside: /sbin/dhclient-script clobbering /etc/resolv.conf? Not cool. Not cool.
(Really I’d like universally unique IPs all of the time, regardless of what networks I’m on. And a magic IP that is always the IP of the host the guest is running on. And SkyNet…)
Parsing CacheGrind from Ruby
Here’s a little script to show how many times files are accessed during a function call (or integration test) series, for use with tools like XDebug. In my particular application, I had a large codebase and didn’t know what files were touched (or not) during a relatively complex call chain.
require 'optparse'
require 'ostruct'
options = OpenStruct.new()
options.compact = false
OptionParser.new do |opts|
opts.banner = "Usage: cache_blaser.rb [options]"
opts.on("-c", "--compact", "Report on directories, not files") do |c|
options.compact = true
end
end.parse!
called = {}
ARGV.each do |filename|
open(filename) do |handle|
handle.each_line do |line|
if line=~/^fl=(.*)/
key = $1
key = File.dirname(key) if key.include?("/") and options.compact
called[key] = called.has_key?(key) ? called[key]+1 : 1
end
end
end
end
keys = called.keys.sort do |a,b|
(called[b] == called[a]) ? b <=> a : called[b] <=> called[a]
end
keys.each do |file|
begin
printf("%06d | %s\n", called[file], file)
rescue Errno::EPIPE
end
end
Usage: (top 50 most accessed files)
ruby cache_blaster.rb /tmp/cachegrind* | head -n 50
The output is number of times something in each file was referenced. This could easily be adapted to also include function calls, or list top function calls for each file.
080976 | php:internal 029876 | /path/to/file/a.php 009454 | /path/to/file/b.php 005875 | /path/to/file/c.php 004552 | /path/to/file/d.php 002433 | /path/to/file/e.php 001522 | /path/to/file/f.php (etc)
Obviously all this profiling data is already scanned by tools like KCacheGrind, though who really likes GUI tools for more complex data mining and for generating custom reports?



