How to make a wonderful cookie dessert in a skillet

A few weeks ago I stumbled across this recipe for making a cookie in a skillet http://www.sophistimom.com/one-pan-skillet-cookie and shared it with a few people because I though it looked cool. My wonderful wife then put “skillet” on our shopping list because she knows I can’t resist cookies, and yesterday we tried out the recipe. It was easy and tasted wonderful 🙂

Below are some pics of the treat.

[album id=29 template=dopefish]

How to increase Fraps performance with a ramdisk

I recently started playing Battlefield 3 and remembered that I have a Fraps license so I installed it and started recording some stuff. Unsurprisingly the performance made a big dip when I recorded. A glance at my PC told me the harddrive was at fault, probably bringing the whole system down due to IO.

Since my PC has more than enough RAM I decided to set up a 5Gb Ramdisk to see if that helped. It did, when writing the video files to the ramdisk I hardly had any performance hit. Unfortunately 5GB isn’t going to last long while recording 1920×1080 @ 40FPS (a few minutes footage at most).

Here is my little cmd file to create a 5GB ramdisk as drive J: and format it for usage:

So my next thought was to see if I could write a script to move files off the ramdisk when they were done being written to by Fraps. This obviously was going to cause IO load … the reason we were having performance issues in the first place, so I was skeptical about if this was going to help any. Especially since I also had to move the files away quick enough so that the drive wouldn’t fill up completely with the next file Fraps was writing. I wrote a little powershell script for this (yeah, a *nix Sysadmin writing scripts in powershell …)

Here is my little powershell script to copy the finished files from my ramdisk to a normal HDD (please excuse  possible ugliness, I’m a powershell noob):

The last little problem I noticed is that the 5GB ramdrive wasn’t big enough (Fraps seems to create some dummy files and fills them up). Forcing Fraps to make smaller files by toggeling the recording fixed that though -> pressing F9 twice fast will drop a few frames though. I used my Logitech G13 for that, just had a key mapped to press F9 quickly every 60 seconds. The shortest gap I could get working reliably is 50ms.

This all probably sounds awfully complicated, but it works and solves my problem. Fraps is great software, but it would be immensly helpful if you could set the file size in the settings (instead of it defaulting to 4GB). Or, even better, if Fraps could rework their IO system to work more efficiently.

So to sum everything up:
– create ramdrive
– start script that copies files from the ramdrive to a normal HDD
– set fraps to store videos on the ramdrive
– start game, press F9 to start recording and then press the G13 key to toggle the F9 periodically

Yellowstone and Grand Teton Parks

A few weeks ago we traveled a bit west and visited the Yellowstone and Grand Teton National Parks, I’ve finally gotten around to sorting through the pictures and uploading a few (well, actually a lot).

[album id=28 template=dopefish]

I didn’t get around to editing and stitching the panorama photos together yet, or doing anything interesting with the GPS data of our hikes yet. If I get that done I’ll probably update this posting.

rcon.c sorcecode (for linux)

Searching for a linux command line rcon tool can be a bit of a pain: dead links, outdated versions not working anymore, stuff written in php …. yeah. The only version I could find was stuck in a cache of an old webpage. So here is my mirror of the http://www.asyserver.com/~cstrike/rcon.c file that currently gives you a “404, File not found” error. Hopefully this will help anyone trying to find a working version via google and is frustrated with the results. Download, compile, happiness ensured.

http://www.dopefish.de/files/rcon.c

How to build an efficient GeoIP SQL table

This here is a very handy little script I threw together to generate a geoip.sql table for quickly determining which country a IP is from. I already hear you saying “Just convert the IP to an INT and use BETWEEN, how hard can it be”. And you are right, that works. And it may even be your easiest solution, but it just isn’t fast. And if you are planning on hammering the table with thousands of queries you are going to end up looking for something fast.

A while back I found a very interesting posting at www.jcole.us that described how to use Spacial Indexes together with MySQL’s GIS to speed up the queries. The posting has been online for a while and both it and the replies are worth reading.

All I did was make a small bash script to download the current “lite” version of GeoIP CSV file from maxmind.com, use the information from the posting to throw/transform it into a local database table and dump out a .sql file that can be easily imported into any other database. The script isn’t failproof though, it expects your user to be able to use mysql and have permission to create databases/tables and “load data local infile”.

generate_geoip_sql.sh