RedKrieg's Blog http://redkrieg.com /dev/random Thu, 02 Oct 2008 04:41:54 +0000 http://wordpress.org/?v=2.2.1 en Wheeeeeeeee Gravity!1!!eleven! http://redkrieg.com/2008/10/01/wheeeeeeeee-gravity1eleven/ http://redkrieg.com/2008/10/01/wheeeeeeeee-gravity1eleven/#comments Thu, 02 Oct 2008 04:22:34 +0000 RedKrieg http://redkrieg.com/2008/10/01/wheeeeeeeee-gravity1eleven/ Sooooo…. a few days ago I felt like simulating a bit of gravity. Turns out that was the easy part… Basically I wrote a gravity simulator with accurate(?) collision detection all based on force vectors applied over time. I did all the physics and trig work from the top of my head, and the last time I had a physics or trig class was eight years ago, so I might have forgotten something important. Collisions look right to me right now, but the code driving them relies on some pretty loose interpretations of gravity/time, so any frameskips could cause some rather interesting reflections. Tarball (with source) and Ubuntu deb package (binary only) at their respective links.

I made a half-assed attempt at commenting the source, because I’m a nice guy. You should be able to get an idea of what I was thinking from there.

Update [20081002003930EDT]: Almost forgot, uses Cairo for drawing. XOrg process maxes the cpu at the resolution I’m using for this thing… NO idea why. Any programmers wanna help?

]]>
http://redkrieg.com/2008/10/01/wheeeeeeeee-gravity1eleven/feed/
Nag’s Head in 24 hours. http://redkrieg.com/2008/08/10/nags-head-in-24-hours/ http://redkrieg.com/2008/08/10/nags-head-in-24-hours/#comments Sun, 10 Aug 2008 09:03:49 +0000 RedKrieg http://redkrieg.com/2008/08/10/nags-head-in-24-hours/ I’ve been in Nag’s Head for just a bit over 24 hours now and thus far it’s been the best Nag’s Head trip yet. Lets start at the beginning… Deer in a bag. Fucking deer in its fucking bag made me have to do a pirouette in my fucking car on the driver’s side tire, then some kind of double hamstring somersault backflip and ended up in the next lane over doing the speed limit. Totally sweet dude. Once we got here shit got real and we got as obliterated as possible for maximum debauchery. There was some crazy girl, but that problem was solved in short order. Today there was a liberal smattering of rock band, outlet mallification, and beachgoing X 2. The first beach trip (among the day walkers) was pretty much a bust, there being a distinct shortage of surfable waves, however the second trip made tonight worthwhile. I got to the beach around 3 am and immediately noticed that I was surrounded by phytoplankton. Every movement, no matter how deep under water, caused a flurry of tiny green luminescent organisms to fire their biochemical caches and illuminate the immediate area, giving a net effect of glowing water. My friend Scott happened to bring a boogie board and was floating, so I became one with the ocean and learned to float too. After a liberal period of stargazing, I began to pay attention to the ocean’s warm embrace and happened to notice a clicking sound underwater. It was probably a good minute before I realized that the rhythmic clicking I was being subjected to wasn’t one of my friends, but was in point of fact dolphins. I was hearing dolphins talk to each other. I know this description doesn’t really convey the beauty I experienced today, but I wanted to record it regardless. Fuck you.

]]>
http://redkrieg.com/2008/08/10/nags-head-in-24-hours/feed/
KVM Kernel Virtualization in Ubuntu Hardy http://redkrieg.com/2008/03/25/kvm-kernel-virtualization-in-ubuntu-hardy/ http://redkrieg.com/2008/03/25/kvm-kernel-virtualization-in-ubuntu-hardy/#comments Tue, 25 Mar 2008 22:57:00 +0000 RedKrieg http://redkrieg.com/2008/03/25/kvm-kernel-virtualization-in-ubuntu-hardy/ Administration -> Users [...]]]> I just tried KVM under Hardy (which I’m loving by the way) and had some notes in case any other early adopters wanted to give it a try.

To install it, you need three packages (at least, I did):
sudo aptitude install kvm virt-manager libvirt-bin

You’ll also need to add yourself to three groups:

  • System -> Administration -> Users and Groups
  • Click “Unlock”
  • Enter password, etc.
  • Click “Manage Groups”
  • Under each of the following groups, make sure your user name is checked:
    • kvm
    • vde2-net
    • libvirtd
  • Reboot!

When you get the system back up, the Virtual Machine Manager is under Applications -> System Tools.

Have fun!!!

]]>
http://redkrieg.com/2008/03/25/kvm-kernel-virtualization-in-ubuntu-hardy/feed/
The secret to immortality http://redkrieg.com/2008/01/09/the-secret-to-immortality/ http://redkrieg.com/2008/01/09/the-secret-to-immortality/#comments Wed, 09 Jan 2008 21:50:40 +0000 RedKrieg http://redkrieg.com/2008/01/09/the-secret-to-immortality/ I’ve uncovered the secret to immortality.

while(!0xDEAD) die();

The above code will cause you to live forever for all non-zero values of DEAD.

]]>
http://redkrieg.com/2008/01/09/the-secret-to-immortality/feed/
I’m at a loss for words http://redkrieg.com/2008/01/07/im-at-a-loss-for-words/ http://redkrieg.com/2008/01/07/im-at-a-loss-for-words/#comments Mon, 07 Jan 2008 05:03:16 +0000 RedKrieg http://redkrieg.com/2008/01/07/im-at-a-loss-for-words/ I know I don’t update here often, but I just thought it would be pertinent at this particular junction. This blog is a combination of my personal life (usually just the bad parts for whatever reason) and my technological exploits, and today will only be slightly outside the usual realm of nonsensical debauchery. Today, I am happy. There’s someone beautiful and hilarious and brilliant and amazing who has chosen to grace me with her attention. I can talk to her about the most obscure scientific discovery and she wants to know more about it and how it affects the world. Did I mention amazing? I think I did…

But alas, this wouldn’t be a very good post here at redkrieg.com were I not to include something at least remotely technical… This weekend I finished preliminary work on my own thumbdrive based distribution of ubuntu. I wrote my own sexy splash screen and modified the themes a bit. I added all the usual programs that I love, set my defaults the way I like them, and even fixed a few bugs in the latest version (upon which this was based). Since it’s thumbdrive based and I have an amazing thumbdrive (OCZ ATV Turbo), it boots and runs faster than any hard disk install I’ve ever used. Unfortunately desktop effects only work on intel video hardware, but at least I have a persistent partition upon which to store any changes I make to the OS. My 4GB drive should be enough for a year’s worth of work if I stay away from video. All of this is thanks to two wonderful tools. The first of which is remastersys, which I use to turn a virtual machine into a full distribution of linux. Secondly, and just as important to this particular venture of mine is pendrivelinux.com’s tutorial on turning ubuntu 7.10 in to a pen drive bootable (and usable) distro. Now the tutorial as is has some problems, all of which are in the zip file near the end of the tutorial. Many entries in that file don’t work, and the defaults are not set for a persistent install. Luckily for you, fearless user, I have below the contents of my syslinux.cfg for your internet related needs. Also, you can put anything you want in isolinux.txt.

syslinux.cfg:
DEFAULT persistent
LABEL persistent
menu label ^Start Ubuntu in USB persistent mode (saves changes)
kernel vmlinuz
append file=/preseed/ubuntu.seed boot=casper persistent initrd=initrd.gz vga=0x0317 quiet splash --
LABEL live
menu label ^Start Ubuntu in Live mode
kernel vmlinuz
append file=/preseed/ubuntu.seed boot=casper initrd=initrd.gz vga-0x317 quiet splash --
LABEL xforcevesa
menu label Start Ubuntu in safe ^graphics mode
kernel vmlinuz
append file=/preseed/ubuntu.seed boot=casper persistent xforcevesa initrd=initrd.gz quiet splash --
LABEL oem
menu label ^OEM install (for manufacturers)
kernel vmlinuz
append file=/preseed/ubuntu.seed boot=casper oem-config/enable=true initrd=initrd.gz quiet splash --
LABEL hd
menu label ^Boot from first hard disk
localboot 0x80
append -
DISPLAY isolinux.txt
TIMEOUT 50
PROMPT 1

Have fun. I know I am.

]]>
http://redkrieg.com/2008/01/07/im-at-a-loss-for-words/feed/
Bacon Cookies http://redkrieg.com/2007/12/09/bacon-cookies/ http://redkrieg.com/2007/12/09/bacon-cookies/#comments Sun, 09 Dec 2007 18:13:32 +0000 RedKrieg http://redkrieg.com/2007/12/09/bacon-cookies/ Someone finally took my advice about bacon being the food that makes other food better and baked fucking bacon cookies! I want a batch of these right now. If you make me bacon cookies, I will be in debt to you forever.

]]>
http://redkrieg.com/2007/12/09/bacon-cookies/feed/
Fucking logic http://redkrieg.com/2007/12/03/fucking-logic/ http://redkrieg.com/2007/12/03/fucking-logic/#comments Mon, 03 Dec 2007 06:28:55 +0000 RedKrieg http://redkrieg.com/2007/12/03/fucking-logic/ I started to write some really deep, insightful shit about my life. Then I realized it’s probably not something I should put out for all to see, so I’m starting a journal.

Fuck.

]]>
http://redkrieg.com/2007/12/03/fucking-logic/feed/
The fight is finished http://redkrieg.com/2007/09/27/the-fight-is-finished/ http://redkrieg.com/2007/09/27/the-fight-is-finished/#comments Fri, 28 Sep 2007 04:11:36 +0000 RedKrieg http://redkrieg.com/2007/09/27/the-fight-is-finished/ Well, I finally finished the fight and beat Halo 3 on Legendary. It took much longer than I expected, but was worth every second. I also found all but 1 skull (the last one has yet to be found by anyone) and tomorrow I’ll activate all 7 terminals. I feel so accomplished… and so tired. Hail to the Master Chief.

]]>
http://redkrieg.com/2007/09/27/the-fight-is-finished/feed/
Juno http://redkrieg.com/2007/09/18/juno/ http://redkrieg.com/2007/09/18/juno/#comments Tue, 18 Sep 2007 21:34:54 +0000 RedKrieg http://redkrieg.com/2007/09/18/juno/ So, I just saw a preview for the film “Juno” and I can’t wait. It looks fantastic, and has some awesome one-liners in the trailer alone. Same director as “Thank You for Smoking”, which you should also see.

]]>
http://redkrieg.com/2007/09/18/juno/feed/
My New Lighter http://redkrieg.com/2007/09/01/my-new-lighter/ http://redkrieg.com/2007/09/01/my-new-lighter/#comments Sat, 01 Sep 2007 23:15:03 +0000 RedKrieg http://redkrieg.com/2007/09/01/my-new-lighter/ I modified a cheap Zippo to contain a really cool surprise! Impress your friends! Pics and video after the jump.

(more…)

]]>
http://redkrieg.com/2007/09/01/my-new-lighter/feed/