Friday, May 29, 2009

A co-worker wrote a nice little lisp snippet for emacs to indent the entire buffer. I should modify it to indent a marked region, if there isn't code to do this already.

(defun indent-whole-buffer ()
"Indent the entire buffer"
(interactive)
(indent-region 0 (buffer-size)))

Sunday, May 24, 2009

Such a lame ending to a great game, Fallout 3

Finally finished Fallout 3. Unfortunately, the ending was just about the most horribly stupid ending that I can remember. I've not been watching many movies lately, so maybe I'm more susceptible to stupid STUPID endings, but the ending was a contrived turd strained out in pain. Especially when it was already established that there was another character who could accomplish the final 'deed' without being harmed in anyway, as that character had already done before. A super mutant, Fawkes, who was resistant to radiation, had gone into a highly irradiated chamber to retrieve a device called the G.E.C.K, but when asked to do the same task and enter in a simple code into a computer, his response was something along the lines of 'you have your own destiny to follow'. Apparently there's another character, Charon, who REGENERATES HEALTH from radiation, who basically says the same thing.

Poor, POOR form.

Thursday, May 21, 2009

Convert DOS files to unix in emacs.

Essentially, C-x RET f undecided-unix


from this guy

Friday, May 15, 2009

It's cruel not to kill pumpkin..

Fallout 3 is a truly great game. Right there on the level of Fallout/Fallout 2.

Anyway, wondering around the wastes, I stumbled upon a giant mole rat named 'pumpkin' cage up in a dead guy's laboratory (well after I met him, a dead guy's laboratory). In this laboratory, the guy works on trying to make mole rat meat better tasting and better for you. I read in quite a few places that people couldn't bring themselves to kill pumpkin and harvest the meat to create the wonder mole meat. While the whole "can't kill a virtual animal thing" is curious (and well.. old), the fact that people DON'T kill pumpkin is vastly more cruel than actually killing pumpkin. Pumpkin, at least in terms of the game, is left to starve to death in a confined cage where it cant turn around.

I'm willing to wager that this is how most people are in real life as well. They're unwilling to put down the dog trapped in the cage starving to death with a wire cinched so tight around it's waist that it's cut into it's abdomen.

Course, this is just my paper tiger, my model that I hold up to people in comparison so that if they do match up with the model I described, I can mock them relentlessly and feel vastly superior to them.

Thursday, May 14, 2009

Ignoring file types in svn

Create a file (.svnignore) with the regular expressions

*.pyc
*~

Run svn propset on the project

svn -R propset svn:ignore -F .svnignore .

-R indicates that you are doing this recursively so all the directories ignore these.
-F indicates the file we just created with the regular expressions.

Originally found over on Pandemonium Illusion

Tuesday, May 12, 2009

Curl examples

No traffic info today, left too late.

Nice curl examples

Wednesday, May 6, 2009

Traffic May 6 and traffic notes

weather: Sunny
traffic: light
time: 920-1000

Well, why the traffic builds up on certain days vs others is beyond me. My guess was that possibly on sunny days, mom's, teens on break from school, and other non-working types were jumping on the road to head out to the beach or some such, but alas no.

I've known about traffic antipatterns for a while and practice them every once in a while, but this deals more with the traffic as it is currently. I'm more interested as to why the traffic is heavy on certain days vs other days.

I've never been the agressive try-to-get-10-cars ahead type, as I generally let my 'chunked'[1] driving skills handle the traffic as best as it can and I usually move through large parts of traffic completely oblivious to the traffic around me. I usually find I can usually plan out what I intend to do at work or enjoy music while I'm dinking along at 20 mph. Which is also why I tend not to do the traffic antipatterns as much either, I have better things to think about than trying to deal with the traffic around me. There have been several times when I've made the 75 mile drive to my parents place with no traffic and not remembered any part of the drive at all.. which is great!

This, of course, only works to an extent while commuting as eventually I have to merge over or let people in or do something else that requires me focusing on driving again. Still, what's more interesting to me is why? Why was there less traffic today, a very nice day, than last Wednesday? Why are there more cars in the parking lot? Why, apparently, are there more cars on the road? I suppose I have to see if there are other events or something else going on.. but that's gunna take more effort.

Tuesday, May 5, 2009

Emacs Dired mode quick reference.

Some particular highlights are:
  • To enter Dired mode simply do C-x C-f and select a directory
  • To open a file or directory, move the cursor to the name of the file you want to edit and hit enter (or e)
  • Create a directory - +
  • Copy a file - S[hift]-c
  • Move/rename a file - S-r
  • Delete a file by pressing `d` to mark it for deletion, then press `x` to process all marked files. Press `u` to deselect a file marked for deletion.
  • Press `~` to mark all backup files in the current directory for deletion (again, use `x` to actually remove them).
  • Refresh the Dired screen with `g`
  • Diff two files with `=`
  • Mark a file with `m` and then perform a shell command on said marked files with `!`. You can also just run a command with `!`. For example, download a zip file with `!wget www.com/somezipfile.zip` and then with that zipfile under the cursor, run `!unzip`
  • And the coolest bit, you can use regex to rename groups of files in a directory with %r. If you have Main.as and Main.2.as and you want to rename them to main.as and main.2.as, you can do `Main\(.+\).as` to `main\1.as`