function check_referrer() { if (!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == “”) { wp_die( __('Please enable referrers in your browser, or, if you\'re a spammer, bugger off!') ); } } add_action('check_comment_flood', 'check_referrer'); 2008 October | buffer overflow

Archive for October, 2008

School makes me want to do things

October 16th 2008

So far this year, school has made me complete the sentence “this makes me want to…” with the following phrases:

  • kill babies
  • eat babies
  • kill puppies
  • kill kittens
  • kill puppies with kittens
  • rape virgins
  • strangle homeless people
  • stab my eyes
  • stab the profs eyes
  • stab the TAs eyes
  • eat glass
  • drink acid
  • fuck a hand grenade
  • stab myself

I guess that about covers it…

Posted by darkhelmet under Life | No Comments »

Randomize wallpaper upon KDE login

October 12th 2008

I wanted my wallpaper to change whenever I logged in, but found no easy way to do this. In KDE you can tell it to slideshow the wallpaper, but that’s not what I wanted. Just, when I log, switch to a new wallpaper. I want to say “pick a file randomly out of the files in a directory and set the wallpaper on all the desktops”

So here’s my ruby script.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env ruby
 
require 'rubygems'
require 'getopt/std'
 
module RandomArray
  def random
    self[rand(size)]
  end
end
 
opts = Getopt::Std.getopts("d:n:")
 
raise "No directory given. Use #{__FILE__} -d <directory> -n <number of desktops>" unless opts.include?('d')
raise "No desktop count given. Use #{__FILE__} -d <directory> -n <number of desktops>" unless opts.include?('n')
 
DIR = opts['d']
 
image = Dir.entries(DIR).map do |e|
  "#{DIR}#{File::Separator}#{e}"
end.reject do |e|
  File.directory?(e)
end.extend(RandomArray).random
 
1.upto(opts['n'].to_i) do |i|
  system("dcop kdesktop KBackgroundIface setWallpaper #{i} #{image} 8")
end

I realize python has some dcop stuff and you can sort of just call it, and ruby probably does too, but I couldn’t find good docs on any of that, and I just found the command line thing to call, so I hacked this up in ruby, and it works quite well.

I realize the reject should really be done before the map, and originally had it like that, but then the File.directory? call was more complicated, so I changed it to this.

Make a bash script in ~/.kde/Autostart and add the following.

1
2
3
#!/usr/bin/env bash
 
random-wp.rb -d $HOME/wallpaper -n 4

I have 4 workspaces, hence the 4 at the end. Alter appropriately.

Posted by darkhelmet under Computers & Linux & Programming | No Comments »

Nile Monitors in Florida

October 3rd 2008

This looks like a good paper. I’ll be reading it this weekend.

Status of the Nile Monitor (Varanus niloticus) in Southwestern Florida

Posted by darkhelmet under Reptiles | No Comments »

419 The Nigerian Scam

October 1st 2008

You know…while I give props to the guy for making this movie with a whopping budget of $180, and then winning a film festival, etc, etc, I can only laugh at his stupid fucking friend who actually fell for this shit, and got fucked. You dumb fuck. Think before you act.

419 The Nigerian Scam

Posted by darkhelmet under Intraweb & Life | No Comments »

My wishlist

 Subscribe in a reader
  • Categories

  • Tags

  • Monthly

  • Pages

  • Blogroll

  • Last.fm

  • Einstein@home

  • Word of the Day