Ask HN: What's your proudest hack?
21–30 of 414 posts
Re: Ask HN: What's your proudest hack?
#22https://blog.jgc.org/2011/02/hacking-toshiba-t4800ct-love-st...
Re: Ask HN: What's your proudest hack?
#23I have started using xdotool [1] to create bash scripts that send mouse clicks and keystrokes to apps. Interleaving calls to xdotool with the "sleep" command [2] produce a convincing effect. If I need to redo a video to fix typos or after a program update, I just fix the bash script and restart the recording.
Alas, the only thing that is missing in my videos is the sound of keyboard clicks… But nothing is perfect!
Re: Ask HN: What's your proudest hack?
#24That led to a second, though lesser, hack. The problem turned out to be code that was allocating way too much memory. (Userland programmers working in the kernel, ugh.) This would sometimes cause the stack pointer for one task to jump all the way over its task structure into the stack of the previous task, which would make that stack very confusing. That's why it took two days to figure out, even with dumps in hand. (Also, putting the stack right next to the task structure was a stupid decision on Linux's part.) To find the dozens of places where this was happening, I wrote a tool to disassemble all of our kernel code and look for the part of the function prolog that allocated stack space, thus creating a list of those that were allocating too much. Then I spent a week fixing them.
It was a grueling process, under lots of pressure at a struggling startup, but ultimately the result was very rewarding.
Re: Ask HN: What's your proudest hack?
#25I've worked on a single-machine computer vision system which used RabbitMQ to send messages around, including JPEG frames which were rather heavy, in contrast to other messages. After we hit a certain number of frames/second, RabbitMQ became a bottleneck. My solution was to write the JPEG frame in the shared memory, then pass around shared memory ID, offset and frame length, instead of the whole frame. Only services…
Re: Ask HN: What's your proudest hack?
#26I wrote a script to capture and replay network traces from Wireshark (then called Ethereal) that included keeping the timings intact. Caught the bug reliably every time.
I still think that's the best thing I every did.
Re: Ask HN: What's your proudest hack?
#27I saw the excel file, asked for 5 minutes, came back after 15 and had solved the problem to such a degree that it went from wasting two hours for two teamleaders on every night we did this job to being almost trivial for one to do in 5 minutes.
And the solution was trivial. Like really trivial. But no one had thought of it before : )
Second best probably when I saved a messed up server in US (an person on site hadn't noticed the . in rm -rf ./bin and had proceeded to use sudo without thinking, as every Linux user does when they go through that dangerous phase).
I realized I still had one ssh connection to the server, realized either scp or rsync or something was in sbin (or somewhere else) and we could use it to copy the necessary binaries to get it back on track.
This easily saved us a 3 days (RHEL with Oracle 11g something easily took days to get right and it also was a massive pain to do).
Re: Ask HN: What's your proudest hack?
#282 daily scheduled 20 minute naps (8AM, 3PM) with noise cancelling headphones and a face mask neutralizes the side effects of sleep fragmentation with a new child.
isn't 8AM still part of the night sleep? do you wake up super early? I would expecting something like 11AM, 3PM :D
Re: Ask HN: What's your proudest hack?
#29Started as a hack, turned into the standard way of how I deploy all my personal projects, and then some.