When xscreensaver starts screen saving, instead of a boring screen saver it spawns a small shell script. This shell script starts a new X server with a very minimal awesome window manager and unfreezes a kvm virtual machine containing a Windows XP on that X server, ready to be used by any passersby. To unlock the screen, you need to switch back to the VT where your usual X is running. As soon as the screen is unlocked, xscreensaver sends a SIGTERM to the shell script which in turn stops all the X servers, window managers and virtual machines it launched and resets the VM image. Should the VM exit before the screen is unlocked because somebody pressed "Shut down" the VM image is reset and the VM restarted.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
for i in range(0, 100): | |
if not i % 15: | |
random.seed(1178741599) | |
print [i+1, "Fizz", "Buzz", "FizzBuzz"][random.randint(0,3)] |
Since password managers are big and complicated and I currently am pretty bored since I am sitting in a car for a few hours, here is a simple algorithm to generate resource-specific, unique passwords using a master password and no password database.
As pointed out here: http://news.ycombinator.com/item?id=4374888 this method is broken.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def screenshotFilter(poi): | |
'''This looks for signs that have their first line in the 'Image:<id>' format, where <id> is an | |
id from an Imgur.com image.''' | |
if poi['id'] == 'Sign': | |
if poi['Text1'].startswith('Image:'): | |
poi['icon'] = "painting_icon.png" | |
image_html = "<style>.infoWindow img[src='{icon}'] {{display: none}}</style><a href='http://imgur.com/{id}'><img src='http://imgur.com/{id}s.jpg' /></a>".format(icon=poi['icon'], id=poi['Text1'][6:]) | |
return "\n".join([image_html, poi['Text2'], poi['Text3'], poi['Text4']]) | |
def playerFilter(poi): |
NewerOlder