Fresh Backgrounds

0

Rotating backgrounds in Ubuntu 11

I don’t know about you, but I love change. One of the simplest ways to accomplish this is having fresh, inspiring images on your desktop. It would drive me crazy if I had to walk into to the office every morning and stare at the exact same display I always did.  Or if I awoke from the same dream, from the same bed at the same time, looked in the same mirror, made the same frown, and felt the same way as I did everyday (blur lyrics if anyone hasn’t caught on yet).

Rotating the directory, automatically

Ubuntu has the ability to create wallpaper slideshows, which helps alleviate this issue, but unfortunately, creating these slideshows is a pain in the ass. I ended up writing a quick python script that will do this automatically. It simply transitions between every file in a directory you specify. Just go to InterfaceLift and start downloading.

To configure: simply replace backgrounds_dir and xml_file from the following:

#!/usr/bin/python
import os,random
backgrounds_dir = '/home/wes/Pictures/backgrounds'
xml_file = '/usr/share/backgrounds/contest/background-1.xml'
duration = 10 * 60
transition_duration = 10

def begin():
	return '<background><starttime><year>2009</year><month>09</month><day>06</day><hour>00</hour><minute>00</minute><second>00</second></starttime>'
def end():
	return '</background>'

def create_entry(current_bg, next_bg):
	text = '<static><duration>' + str(duration) + '</duration><file>' + current_bg + '</file></static>'
	text += '<transition><duration>' + str(transition_duration) + '</duration><from>' + current_bg + '</from><to>' + next_bg + '</to></transition>'
	return text

if __name__ == "__main__":
	background_xml = begin()

	background_list = []
	for filename in os.listdir(backgrounds_dir):
		background_list.append(backgrounds_dir + '/' + filename)

	random.shuffle(background_list)
	x = 0
	while x < len(background_list):
		if x == len(background_list) - 1:
			next = 0
		else:
			next = x+1

		background_xml += create_entry(background_list[x], background_list[next])
		x += 1
	background_xml += end()

	f = open(xml_file, 'w')
	f.write(background_xml)

To make the change, just run the script. Or if you constantly add images to your backgrounds folder, add the script to your crontab:

0 */8 * * * /home/wes/scripts/background_change.py

Enjoy, and stop being so boring.



Mt Washington

0

So this happened.  Actually it happened a couple years ago, but it’s worth writing about anyway.

Mount Washington is known for it’s “Dangerously Erratic” weather.  They had the wind-speed world record until recently at 231 mph.  I’m not sure if you’ve ever experienced 231mph winds, but it will rip your goddamned face off and not even apologize about it.  231 mph will kill you, then go on to kill various members of your family.  So let’s all hold hands and summit this beast, shall we?

More



Yosemite

0

I went to Yosemite.  Yay.  What follows is our 5 day journey into one of the greatest national parks in the country.

Day 1 – Mist Trail

The first day of Yosemite was mostly about getting our bearings. Checking into our campground, driving around taking pictures of the major landmarks, and went for a quick hike on the mist trail. One of the more remarkable things you notice in the major touristy areas, is how tame the animals are — also, how out of shape the tourists are.  The first scenic area on the mist trail is roughly a half mile out.  A half mile. I’ve never heard more huffing and puffing.  You’ll see groups of fatsos taking breaks like it’s some kind of marathon.  It’s unbelievable.

More



Puzzle #1

0

Description:

This is my first puzzle. It’s created in a similar fashion to the recent Sophos 2011 puzzle put on by Paul Ducklin. I had such a great time with it, I decided to try and create my own.  The challenge with this was making sure to keep some perspective on how difficult the puzzle is.  The only thing you really need to solve this is some knowledge about computer science and development.  No real crypto in use here.

The Puzzle:

I provided some clues below to get you started.  They are just clues, and aren’t used as part of the puzzle:

Two images that make up one.

It’s as though they’re meant to be together.

Two peas in a pod.