HNHacker News
TopNewBestAskShowJobs

cryptonaut

27 karma · joined June 22, 2014

submissionscomments
cryptonaut··on Portable Text – JSON rich text specification for content editing platforms
I'm really struggling to understand that as well. Can't wait until this comes full circle and someone decides to write a "simplified" version that allows you to write some variant of <foo>bar</foo> that gets compiled into a JSON string. Bonus points for the huge waste of bytes in the JSON representation!
cryptonaut··on A file that’s both an acceptable HTML page and a JPEG (2012)
It's a JPEG with the HTML written in the comment field:

  # exiftool -b -comment <(curl -s http://lcamtuf.coredump.cx/squirrel/)
  <html><body><style>body { visibility: hidden; } .n { visibility: visible; position: absolute; padding: 0 1ex 0 1ex; margin: 0; top: 0; left: 0; } h1 { margin-top: 0.4ex; margin-bottom: 0.8ex; }</style><div class=n><h1><i>Hello, squirrel fans!</i></h1>This is an embedded landing page for an image. You can link to this URL and get the HTML document you are viewing right now (soon to include essential squirrel facts); or embed the exact same URL as an image on your own squirrel-themed page:<p><xmp><a href="http://lcamtuf.coredump.cx/squirrel/">Click here!</a></xmp><xmp><img src="http://lcamtuf.coredump.cx/squirrel/"></xmp><p>No server-side hacks involved - the magic happens in your browser. Let's try embedding the current page as an image right now (INCEPTION!):<p><img src="#" style="border: 1px solid crimson"><p>Pretty radical, eh? Send money to: lcamtuf@coredump.cx<!--
cryptonaut··on Rust for Rubyists
Minor correction:

In the section about converting a vector of strings into integers the article says that the Result returned from parse() is converted to a bool via Result::ok(). However, Result::ok() actually converts the Result<T, E> into a Option<T> which is what filter_map() expects.

cryptonaut··on Automated encrypted swapfiles
If you're using systemd you can do this by setting up /etc/crypttab[1] which has a similar format to fstab. For example, here's my swap line:

     eswap   /dev/mapper/vg0-swap    /dev/urandom            swap,cipher=aes-cbc-essiv:sha256
[1] http://www.freedesktop.org/software/systemd/man/crypttab.htm...
cryptonaut··on To Master Vim, Use It Like Language
Was just about to post this. Though I map Caps-Lock to Esc through xmodmap so it works everywhere instead of just in Vim.
cryptonaut··on How We Uncovered the Real Identity Behind “Startup L. Jackson”
I'm missing the scroll bar too, it's really annoying. After looking at the stylesheet it looks like it's due to this rule: body::-webkit-scrollbar { width: 0!important; }. If you remove that rule the scroll bar will be visible again. Here's some JavaScript that you can copy-paste into the address bar to fix it (only tested on Chromium):

    javascript:void(_(document.styleSheets).chain().pluck('rules').map(_.flatten).flatten(true).findWhere({selectorText:"body::-webkit-scrollbar"}).value().style.removeProperty('width'))