Desktop Watcher

Have you ever forgotten to lock your computer and went for a lunch? If so then you know what can happen. Your coworkers can send invitation for a party at your place to all co-workers (using your e-mail). They can also mess up with your desktop icons and much, much other fun stuff. The best solution is always lock the system. However sometimes we forget about it.

Once I was bored after work I created WinForms application, which starts playing scary sound when somebody move the mouse or push some key on the keyboard (while I am out of my desk). Usually when you want to mess up with somebody’s machine your heart rate is higher than normal (because of adrenaline that you can be caught). Then not expected scary sound can cause even heart attack.

I named my app: Desktop Watcher. It looks like that:

Desktop Watcher

When you hit Play, you get file dialog to choose some scary sound (like this) from your hard drive. Then you need to put cursor in the program area and leave your machine. You have 5 seconds for that. Every mouse move or keyboard’s key push after that will start sound playing and lock the machine. If you caught somebody the machine will be locked and sound will be playing. To quit the app you need to unlock the machine and hit ALT-F4  immediately (two keys together – because hit only ALT will cause lock screen again) or close app by mouse if you are quick hand person.

No worries that somebody close your app by ALT-F4 before he moves the mouse. If so then system will be locked anyway (but no sound will be played). You do not need to worry about it, because it means that somebody knew you prepared a trap 🙂

There is an issue that mouse needs to be in the program area to detect mouse moves. I may fix it in the future, but for now you can just hide the app somewhere (e.g. on right bottom corner):

Desktop Watcher hidden

Source (and sample scary sound) is available on github: https://github.com/jj09/DesktopWatcher.


Hello (blog) World!

Hi All!

My name is Jakub Jedryszek. There are many reasons why I start this blog. One of them is this article. The other one is the willingness to share my thoughts with the World. Thanks to Michal Franc for a motivation 🙂

I created Hello World in couple of languages using Crayon Syntax Highlighter (code in C#, Ruby, Python, Java and C) and SyntaxHighlighter Evolved (code in PHP). Please comment which syntax highlighter are you using and why.

C#:

Console.WriteLine("Hello (blog) World!");

Ruby:

puts 'Hello (blog) World!'

Python:

print 'Hello (blog) World!'

Java:

System.out.println("Hello (blog) World!");

C:

main()
{
    printf("Hello (blog) World!");
}

PHP:

<?php echo "Hello (blog) World!"; ?>

Assembler (AT&T syntax):

        .section        .rodata
string:
        .ascii "Hello (blog) World!\n"
length:
        .quad . -string         #Dot = 'here'
 
        .section        .text
        .globl _start           #Make entry point visible to linker
_start:
        movq $4, %rax           #4=write
        movq $1, %rbx           #1=stdout
        movq $string, %rcx
        movq length, %rdx
        int $0x80               #Call Operating System
        movq %rax, %rbx         #Make program return syscall exit status
        movq $1, %rax           #1=exit
        int $0x80               #Call System Again