Show HN: QR Codify, The Most Useful Snippet I've Ever Written
zacharyvoase.com
zacharyvoase.com
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)');document.body.appendChild(i)})();
Create a new bookmark, name it "QR Selection" and add the above code as the URL. Only tested in Chrome.Edit: Added missing 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)}());Edit: Still a cool extension you've got there! Not taking anything away from it.
The feature is enabled by default so if you're using Chrome already (on both devices, with your Google account), then it's likely already syncing (and clearly not punishing your phone).
I created a document using TitanPad (http://titanpad.com/) -- any paste bin service will do. I then bookmarked that document on all my computers and phones. I called the bookmark 'Text Sync'.
Bonus if your favorite paste bin supports versioning. You can use secure Gists if you've got some private text to pass around.
Fortunately, OS X now has Services
This feature originates in NeXTSTEP, and I'm fairly certain it has been in OS X since the beginning. qrencode -o - -l L -s 10 -- "$(xsel)" | displayWorks with Redlaser only as most QR code readers open web links in a viewport instead of pushing out to safari.
They're even pretty if you embed them with a bitmap using QArt — http://research.swtch.com/qart
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.
Because hey, I'mma scan this QR code, and then remember about it when I'm topside.
Keep your phone hidden (but check out this QR code!)
Instead of trying to scan that QR code (in a corner of a billboard), here's the URL: http://www.btp.police.uk/pickpockets/
OP's program removes 1/3rd of the steps, making it much easier for the user.
Thanks!
Only quibble is: how big a code can this viably render? tried something not particularly large for fun and just got a big "PNG" icon instead.
In terms of size: I think QR codes go up to 1024 bytes; anything larger and perhaps the Google Chart Image API would return an error, so you'd be quicklooking an empty file with a '.png' suffix, hence the generic PNG icon.
The next evolution of this script is to store larger text strings in a pastebin and then just display a QR code for the URL to that.
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 can also make this an alias, hotkey, etc.[1] http://fukuchi.org/works/qrencode/
Edit: No need for temporary file
http://keyboardp.tumblr.com/post/38976790879/send-webpage-fr...
https://gist.github.com/findel/5099737
Credit for the selection code: http://stackoverflow.com/questions/4652734/return-html-from-...
[Edit: created gist]
http://miniqr.com/http://www.example.com/
http://miniqr.com/"hello world"
does mostly the same as mentioned above, does this for i think now 4 years (i coded this on a beach in mexico, lets say my memories are fuzzy)after looking at the market fo QR codes now for 4 years, i don't think i will get rich with just that side project. QR codes just do not fulfill any use case for users (they fulfill a use case for content publishers and advertisers, but non for users)
p.s.: if you want to (really) see people scanning QR codes, there is a page for that, too http://replycam.com/browse.php
QR Code transfer is probably patent encumbered (like well almost everything).
Nokia has app to do this but in reverse. Look at photo gallery on phone in their app. When you find picture you want to see, open browser on desktop and see QR code. Point camera at screen and the QR code in browser is replaced by image from phone.
http://conversations.nokia.com/2012/11/30/photobeamer-the-ma...
This means that while the standard's official documentation might require that it be purchased (this is the case with QR), or while software which interacts with it might not be free/gratis, it must not carry with it patent or licensing encumberances. While ISO allows "reasonable and non-discriminatory" patents/licenses to be enforced against technologies which are ISO standards, something like a barcode format is difficult to justify licensing restrictions in almost all cases.
Also, iPhone users should check out the Scan app[1] for a QR code reader. It's by far the fastest starting, simplest QR scanner I've been able to find; Most of the other apps seem to be cramming in price-checking features and have butt-ugly icons.
[1]: http://scan.me
https://github.com/fabriceleal/chrome-extension-url-qr-encod...
Maybe you can sign up for an SMS broker and send SMSs if you don't have a Mac (it's less expensive than you think)
I have a web server that only responds to requests from my LAN. I put sensitive info into an HTML file there, then point my phone's browser to it to copy/paste it; then I delete the info from the file. This way the data never leaves my LAN, which I believe is reasonably well protected.
http://news.ycombinator.com/item?id=5016497 http://youtu.be/HQNB9XZdPCk
http://random-seeds.tumblr.com/post/44730735573/a-useful-os-...
Deleted comment
Can't reproduce it after refreshing.
My bad, I'll delete the original comment.
Deleted comment
function qrshow(){ qrencode -s 10 "$1" -o - | display - ; } qrdisplay () {
qrencode -o - "$1" | display
}This has been a feature for OS X for a long, long time.
Then I saw it was unnecessary, qrencode provides ANSI support.
echo foobar |qrencode -tANSI -o- #grey, blech
So I threw some sed at it: echo foobar |qrencode -tANSI -o- | sed -e "s/\[47m/\[0\;5\;37\;47m/g" -e "s/\[40m/\[0\;34\;40m/g"
But then I looked again, and qrencode provides this to you too: echo foobar |qrencode -tANSI256 -o- # pretty, yay
You can double the output size with: echo foobar |qrencode -tANSI256 -o-|sed -e "s/ / /g;p"
Very pleasing! Might actually use qr codes now.