Live data from Hacker News

Show HN: QR Codify, The Most Useful Snippet I've Ever Written

zacharyvoase.com

51–60 of 117 posts

Re: Show HN: QR Codify, The Most Useful Snippet I've Ever Written

#52
post #51

Look, this even works when you’re offline :) qrencode -o - -l L -s 10 -- "$(xsel)" | display

and doesn't tell Google.

I guess you could buffer the selections in a temporary file and upload it to Google with a cronjob or something…

Re: Show HN: QR Codify, The Most Useful Snippet I've Ever Written

#53

Earlier quoted context omitted.

Yeah, I was about to add that too. Sad, but fun to play with until it is gone ;)

You can do it locally with qrencode[1], which is available via MacPorts and Homebrew. It would probably simplify the script, too (especially if converted to bash). On an X11 environment, I can select some text and get the same results on the command line with something like: xsel | qrencode -o - | feh -FZ None of these commands are standard on any distribution, but you can easily install them or use alternatives. You…

You can use pbpaste on OS X in place of xsel.

Re: Show HN: QR Codify, The Most Useful Snippet I've Ever Written

#55
post #2

http://picturesofpeoplescanningqrcodes.tumblr.com/

QR codes on billboards and in marketing are kind of rubbish, but in terms of moving a URL or a phone number from your PC to your phone quickly, they're actually pretty useful.

QR codes on billboards and in marketing are kind of rubbish

On a big billboard beside the freeway, sure. In a home for sale sign, or in a bus shelter, or anywhere else where people are either a) very interested or b) captive, they are fantastic.

Re: Show HN: QR Codify, The Most Useful Snippet I've Ever Written

#56
post #22

I use Chrome to Phone with my android phone. One click on a button sends the current url to my browser, or I can select any text, right click it and send it to my phone where it is then available on my clipboard to paste wherever. It also keeps a history of all this on my phone so I can recall what I sent last week. That feature alone is why I'll probably never own an iPhone. Edit: Still a cool extension you've got t…

Chrome for iOS does this job beautifully :)

Indeed. If only it weren't stuck with a slow js interpreter.

Re: Show HN: QR Codify, The Most Useful Snippet I've Ever Written

#57

I read through the comments, expecting to see a JS version of this, but I didn't find one so I made it: javascript:(function(){ var i = new Image();i.src = 'http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl='+ encodeURIComponent(getSelection());i.onclick=function(){i.parentNode.removeChild(i)};i.setAttribute('style', 'position:fixed;top:50%;left:50%;margin:-150px 0 0 -150px;box-shadow:0 0 20px rgba(0,0,0,0.2)…

Missing a closing apostrophe.

    javascript:(function(){var a=new Image;a.src="http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl="+encodeURIComponent(getSelection());a.onclick=function(){a.parentNode.removeChild(a)};a.setAttribute("style","position:fixed;top:50%;left:50%;margin:-150px 0 0 -150px;box-shadow:0 0 20px rgba(0,0,0,0.2)");document.body.appendChild(a)}());

Re: Show HN: QR Codify, The Most Useful Snippet I've Ever Written

#59

I read through the comments, expecting to see a JS version of this, but I didn't find one so I made it: javascript:(function(){ var i = new Image();i.src = 'http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl='+ encodeURIComponent(getSelection());i.onclick=function(){i.parentNode.removeChild(i)};i.setAttribute('style', 'position:fixed;top:50%;left:50%;margin:-150px 0 0 -150px;box-shadow:0 0 20px rgba(0,0,0,0.2)…

[deleted]
Post reply on HN