Posts Tagged “code”

  • A better Hyper key hack for Sierra

    In the last Web Excursions, I posted a hack for getting Hyper Key functionality back in Sierra. It uses Karabiner-Elements and Keyboard Maestro. It couldn't do one of the things I liked best about the Hyper key, though: allow me to tap it without hitting any other keys to use send Escape. My muscle memory for that has gotten to the point where using Vim without it is an exercise in pain.…

  • Easy retina image serving with Apache rewrites

    The trick uses Apache rewrites and allows every image filename to be inserted in the HTML with "@2x" appended, falling back to the base filename if that file doesn't exist. I also occasionally customize an additional format for social sharing, appending "\lg" instead of "@2x", and the rules cascade such that if "\lg" doesn't exist, it looks for "@2x", and barring that, just uses the base filename.…

  • The Great Mac Dev Survey

    The team at fournova has announced a survey for Mac developers (web, mobile, app, anything that involves coding on a Mac). I think the information gathered will generate some useful stats, and they're offering some great prizes for participating.…

  • Better YouTube thumbnail images

    This is an in-case-you-didn't-already-know tip, and is probably common knowledge to anyone who started writing YouTube scripts after v3 of the YouTube API came out. The gist is that in addition to the tiny thumbnail images that have always been available at a url containing the video id, you can also get a range of qualities and sizes.…

  • Bookmarklet: Clean highlighted code for copying

    I made a little bookmarklet this morning for cleaning up highlighted code blocks in web pages for copying into my notes. You just click it on any web page and all pre>code` blocks and `table.highlight elements will be turned into plain text.…