7 ms·
Cool hack to take a photo of yourself on every commit
- dag11 14y agoNice. I like this idea. Would there be any straightforward ways to pull this off with Git on my Windows machine?
- prydonius 14y agoTry lolcommits: https://github.com/mroth/lolcommits/wiki/Installing-on-Windows https://github.com/mroth/lolcommits/wiki/Installing-on-Windo...
- joelhaasnoot 14y agoLooks like this would work as a native alternative: http://batchloaf.wordpress.com/commandcam/ http://batchloaf.wordpress.com/commandcam/
- deleted 14y ago[deleted]
- praptak 14y agoA similar article from 2009: a guy takes photo of his face on every failed merge. http://andialbrecht.wordpress.com/2009/05/09/when-merging-fails/ http://andialbrecht.wordpress.com/2009/05/09/when-merging-fa...
- noonespecial 14y agoThat 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.
- dubajj 14y agoalso done by lolcommits quite a while ago: https://github.com/mroth/lolcommits https://github.com/mroth/lolcommits
- idonthack 14y agonice grados
- npaquin 14y agoOh.
- tubbo 14y agothat is...completely ridiculous.
- chris123 14y agoBro (i.e, this idea sounds like a Brogrammer thing to me).
- Tichy 14y agoSo what do we call programmers who are too cool to be Brogrammers?
- Killswitch 14y agoPROgrammers. I'll just leave now.
- wanderingstan 14y agoThis little hack takes a picture every hour (webcam and screenshot) and gives visualization of your online work habits: http://wanderingstan.com/lifeslice http://wanderingstan.com/lifeslice
- fidz 14y agoFirst time i think, "what is it used for?" Then i think, "it gonna be fun!" Then i think this hack could inspire me to do something cool for git. Are there any more "unusual" git hack?
- alttab 14y agoWe have post-commit hooks into a web application that will play unreal tournament WAVs on a PA depending on how many commits you have made. Rampage!
- fizx 14y agoGithub link?!
- alttab 14y agohttps://github.com/skottie/rawr-box https://github.com/skottie/rawr-box 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.
- datn 14y agoUnder Linux, one could easily substitute fswebcam https://github.com/fsphil/fswebcam https://github.com/fsphil/fswebcam for command-line pictures and avconv http://www.itforeveryone.co.uk/image-to-video.html http://www.itforeveryone.co.uk/image-to-video.html to make the timelapse. http://coderwall.com/p/ijgggw http://coderwall.com/p/ijgggw
- adventureloop 14y agoI 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.
- ken 14y agoEarlier, jwz in 1994: "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 http://www.jwz.org/gruntle/nscpdorm.html)
- thwarted 14y agoI 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. https://github.com/thwarted/picsofourlives https://github.com/thwarted/picsofourlives
- segmond 14y agoI 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.
- stephth 14y agoHow about an animation instead? #!/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...
- badboy 14y agoJust change the current working directory in the script before running the task. No need to move them then.
- stephth 14y agoYou'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. Here's what I have for what it's worth: #!/usr/bin/env ruby require 'rubygems' require 'systemu' Dir.chdir(File.expand_path('~/.gitshots')) cam_warm_up_time = 2 num_snaps = 6 interval = 0.2 systemu "imagesnap -w #{cam_warm_up_time} -t #{interval}" do |cid| sleep cam_warm_up_time + interval * num_snaps Process.kill 9, cid exit 0 end
- protomyth 14y agoI just have this sick worry that some company will do something like this and use it as part of the code review. "You don't look confident in the picture, is there some reason for that?"
- frossie 14y agoOn the flip side, you will now have documentary evidence to support the assertion "that bug gave me grey hair!"
- protomyth 14y agoOk, 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?
- mahmud 14y agoI have heard of duck-typing but not duckface-typing.
- nonameisfinetoo 14y agoJust how narcissistic can you get?
- jen_h 14y agoI 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!"
- jdub 14y agoWhy do people write five lines of inefficient Ruby when a more direct single line shell script would suffice?
- qxcv 14y agoBecause they're used to using Ruby. The efficiency difference is negligible. $ 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 :)
- batista 14y agoBecause the "inefficiency" is negligible and "premature optimization" is the root of all evil. 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.
- quarterto 14y agoBecause file="~/.gitshots/$(date).jpg" echo "Taking capture into ${file}!" imagesnap -q -w 3 $file is so arcane.
- tomhenderson 14y agoI 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).