That should provide some entertainment later on. I look pretty ragged sometimes when I finally stumble across the line and commit something I've been at war with.
Plus lolcommits includes the commit message. Great for when some of our less technical folks work on the UI and regularly submit "SDF" as the commit message...
This little hack takes a picture every hour (webcam and screenshot) and gives visualization of your online work habits: http://wanderingstan.com/lifeslice
I had a script that took a picture of my every half hour. This ran for about six months and gave me a brilliant insight into the ins and outs of my laptop usage.
"There's finally an Indy on my desk instead of a Sun4. This means that I also have an IndyCam, so I hacked up a script to grab and save a frame of me sitting there every five minutes." (http://www.jwz.org/gruntle/nscpdorm.html)
I tried doing timed snapshots, but it frequently caught an empty chair. So I have it take a picture whenever I deactivate the screen saver, so I'm pretty much guaranteed to be in front of the machine. I also have hooks for other activities/events, like while I'm playing QuakeLive.
I did the same thing on my work computer. I never realized how serious I looked! So now that I'm aware of it, I force myself to smile often, trying to time my smile when the cam is taking pictures.
#!/usr/bin/env ruby
num_snaps = 5
time_int = Time.now.to_i
num_snaps.times do |i|
file="~/.gitshots/#{time_int}__#{i+1}_of_#{num_snaps}.jpg"
system "imagesnap -q #{file}"
end
exit 0
The problem with this code is it makes the camera go on and off successively, which creates a minimum delay between shots. It would be nicer to have finer control over the interval.
Picturesnap somehow supports sequences but there's no control to how long they should last (would require firing a background task), and snapshots get saved in the running directory (instead of based on the passed filename/path) which would require mving each file. Pull request could be a short and sweet free time project...
You're quite right. But we're still left with many problems stemmed from not having control on the sequence length and file names. I've tried it with a background task and the results are super flimsy. The time that the camera takes to be ready varies which then makes the number of files generated vary, sometimes the process is killed before imagesnap finished saving current file resulting in a corrupted image. And the file names outputted are really begging for some post-processing renaming.
Ok, sorta tangent on this. It would be a very interesting study to take photos of a large sampling of drivers during a morning commute into a city. I wonder if you could get some information on what parts of the road really stress out the drivers and cause those grey hairs?
I know this makes me a terrible person and I feel bad about what my brain is saying because someone went to the effort to create this and it's kind of cool if you're the kind of person who isn't creeped out by their own pictures, but my brain instinctually just keeps repeating, "Dang, that's coquetastic!"
I do something similar now and then with a script that takes a photo and a screen grab every minute throughout the day. The resulting 1-2 min movies can be quite fascinating to watch (for me at least).
42 comments
[ 4.0 ms ] story [ 85.7 ms ] threadWould there be any straightforward ways to pull this off with Git on my Windows machine?
I'll just leave now.
Are there any more "unusual" git hack?
Rampage!
Not really designed for public consumption, and the code is quick and dirty. Designed to run on a Mac.
Can also be used with speech recognition and applescripts to curl the web server for voice commands.
http://coderwall.com/p/ijgggw
"There's finally an Indy on my desk instead of a Sun4. This means that I also have an IndyCam, so I hacked up a script to grab and save a frame of me sitting there every five minutes." (http://www.jwz.org/gruntle/nscpdorm.html)
https://github.com/thwarted/picsofourlives
Picturesnap somehow supports sequences but there's no control to how long they should last (would require firing a background task), and snapshots get saved in the running directory (instead of based on the passed filename/path) which would require mving each file. Pull request could be a short and sweet free time project...
Here's what I have for what it's worth:
"You don't look confident in the picture, is there some reason for that?"
$ time sh -c exit
real 0m0.002s
user 0m0.001s
sys 0m0.000s
$ time ruby -e exit
real 0m0.009s
user 0m0.008s
sys 0m0.000s
OTOH I do agree that it is a bit silly to start a Ruby interpreter if you're only going to use it to shell out :)
Because the time it would take them to check the arcane shell syntax would dwarf the time it takes for them to throw a Ruby script together.
Because they like using a superior programming language over the cruft that are the shell syntaxes.
Because they can add more fancy stuff and features to the Ruby version far more easily.
Because they can incorporate the Ruby version to a larger program later on.
Plus the above wont even work as is, since $(date) contains spaces.
This would be "more direct" part.