TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

255 pointsby zacharyvoaseabout 12 years ago

38 comments

martinaglvabout 12 years ago
I read through the comments, expecting to see a JS version of this, but I didn't find one so I made it:<p><pre><code> javascript:(function(){ var i = new Image();i.src = 'http://chart.apis.google.com/chart?cht=qr&#38;chs=300x300&#38;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)})(); </code></pre> Create a new bookmark, name it "QR Selection" and add the above code as the URL. Only tested in Chrome.<p>Edit: Added missing apostrophe.
评论 #5331420 未加载
评论 #5331422 未加载
评论 #5332235 未加载
harelabout 12 years ago
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.<p>Edit: Still a cool extension you've got there! Not taking anything away from it.
评论 #5331152 未加载
评论 #5331272 未加载
评论 #5331570 未加载
评论 #5331173 未加载
评论 #5337484 未加载
评论 #5331053 未加载
TheBindingVoidabout 12 years ago
For Android users there is the Chrome to Phone extension which uses Web Intents. No need to scan a QR code. You can directly send selected text, web links, phone numbers or map links to your phone. <a href="https://chrome.google.com/webstore/detail/google-chrome-to-phone-ex/oadboiipflhobonjjffjbfekfjcgkhco/details?hl=en" rel="nofollow">https://chrome.google.com/webstore/detail/google-chrome-to-p...</a>
chaosphere2112about 12 years ago
<p><pre><code> Fortunately, OS X now has Services </code></pre> This feature originates in NeXTSTEP, and I'm fairly certain it has been in OS X since the beginning.<p><a href="http://en.wikipedia.org/wiki/Services_menu" rel="nofollow">http://en.wikipedia.org/wiki/Services_menu</a>
评论 #5331861 未加载
claudiusabout 12 years ago
Look, this even works when you’re offline :)<p><pre><code> qrencode -o - -l L -s 10 -- "$(xsel)" | display</code></pre>
评论 #5331339 未加载
klinquistabout 12 years ago
Nice. I've built a web app that pushes a mobile provisioning profile to iOS devices with your wifi ssid &#38; password - lets people easily jump on your wifi<p>Works with Redlaser only as most QR code readers open web links in a viewport instead of pushing out to safari.<p><a href="http://www.getonmywifi.com" rel="nofollow">http://www.getonmywifi.com</a>
评论 #5335101 未加载
colmvpabout 12 years ago
<a href="http://picturesofpeoplescanningqrcodes.tumblr.com/" rel="nofollow">http://picturesofpeoplescanningqrcodes.tumblr.com/</a>
评论 #5330944 未加载
评论 #5330861 未加载
评论 #5331068 未加载
评论 #5331421 未加载
评论 #5331087 未加载
duckabout 12 years ago
I can't recommend <a href="http://pushbullet.com" rel="nofollow">http://pushbullet.com</a> enough... it allows you to send anything to your phone and works very well.
评论 #5332098 未加载
ctdonathabout 12 years ago
I saw this, thought "yeah right, gonna be more of a pain than depicted, why bother", downloaded &#38; installed it anyway because I've got a stupid fondness for the idea (if not the awkward reality) of QR codes ... and not 2 hours later was using it for real. Dang handy, nicely implemented.<p>Thanks!<p>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.
评论 #5333954 未加载
marbanabout 12 years ago
Just keep in mind that Google's QR Code (Infographic) API has been deprecated.
评论 #5331433 未加载
评论 #5331094 未加载
keyboardPabout 12 years ago
I created a bookmarklet that does the same thing for any website you're browsing. Makes it easy to transfer from PC to phone, assuming the phone can read QR codes.<p><a href="http://keyboardp.tumblr.com/post/38976790879/send-webpage-from-pc-to-phone-in-seconds" rel="nofollow">http://keyboardp.tumblr.com/post/38976790879/send-webpage-fr...</a>
评论 #5331262 未加载
评论 #5331291 未加载
franzeabout 12 years ago
if you like URL "hacking" you can do something like this<p><pre><code> http://miniqr.com/http://www.example.com/ http://miniqr.com/"hello world" </code></pre> 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)<p>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>p.s.: if you want to (really) see people scanning QR codes, there is a page for that, too <a href="http://replycam.com/browse.php" rel="nofollow">http://replycam.com/browse.php</a>
评论 #5330978 未加载
评论 #5331130 未加载
shawn-butlerabout 12 years ago
Cool, I like it and would use it daily. I sometimes use dropbox like a pastebin for same thing.<p>QR Code transfer is probably patent encumbered (like well almost everything).<p>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.<p><a href="http://conversations.nokia.com/2012/11/30/photobeamer-the-magic-picture-show/" rel="nofollow">http://conversations.nokia.com/2012/11/30/photobeamer-the-ma...</a>
评论 #5331061 未加载
lephtabout 12 years ago
I've been using a Chrome extension I created for the same purpose. The nice part is that it does it without making an external web request, using javascript and canvas.<p>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.<p>[1]: <a href="http://scan.me" rel="nofollow">http://scan.me</a>
评论 #5331052 未加载
评论 #5332102 未加载
mefabout 12 years ago
Great hack. Another way to get text quickly to your phone, if you have an iPhone, is to send yourself a message on Messages.
评论 #5331018 未加载
评论 #5330969 未加载
评论 #5330947 未加载
conradevabout 12 years ago
If you want to read the QR codes just as quickly on your iOS device, check this out:<p><a href="http://news.ycombinator.com/item?id=5016497" rel="nofollow">http://news.ycombinator.com/item?id=5016497</a> <a href="http://youtu.be/HQNB9XZdPCk" rel="nofollow">http://youtu.be/HQNB9XZdPCk</a>
shillabout 12 years ago
Nice work! This inspired me to create an Automator service for pretty printing JSON.<p><a href="http://random-seeds.tumblr.com/post/44730735573/a-useful-os-x-automator-service-for-pretty" rel="nofollow">http://random-seeds.tumblr.com/post/44730735573/a-useful-os-...</a>
dreenabout 12 years ago
QR sounds useful for some minor applications, but for anything serious placed in a public place on a physical medium (like a billboard) its a phishers dream: just put a sticker with your phishing url over the original one and noone will ever realise.
评论 #5331480 未加载
YPetrovabout 12 years ago
Great idea! Never knew about the Automator. That got me inspired to create a HN Search service for myself: <a href="http://news.ycombinator.com/item?id=5331370" rel="nofollow">http://news.ycombinator.com/item?id=5331370</a>
ekarulfabout 12 years ago
Google's chart API also supports ssl: <a href="https://chart.googleapis.com/chart?cht=qr&#38;chs=300x300&#38;chl=FooBar&#38;chld=H|0" rel="nofollow">https://chart.googleapis.com/chart?cht=qr&#38;chs=300x300&#3...</a>
gavingabout 12 years ago
Use pastebot from tapbots (authors of tweetbot) for this sort of thing personally. <a href="http://tapbots.com/software/pastebot/" rel="nofollow">http://tapbots.com/software/pastebot/</a>
sandesh247about 12 years ago
How do I make the "Services" submenu show up in the right click menu?
vladocarabout 12 years ago
Here is also URL to QR Bookmarklet: <a href="http://www.vcarrer.com/2012/06/url-to-qr-bookmarklet.html" rel="nofollow">http://www.vcarrer.com/2012/06/url-to-qr-bookmarklet.html</a>
yahelcabout 12 years ago
My solution here is usually to just send myself a text message from Google Voice. For me, it's faster to open a new tab and paste my text than to find my QR reader and scan.
batemanesqueabout 12 years ago
here's something intended to serve roughly the same purpose for iOS/Mac: <a href="http://www.getbeamapp.com/" rel="nofollow">http://www.getbeamapp.com/</a>
评论 #5336409 未加载
lorenzfxabout 12 years ago
I'm using a zsh function with similar functionality for exactly the same purpose:<p><pre><code> qrdisplay () { qrencode -o - "$1" | display }</code></pre>
评论 #5331252 未加载
ssdsaabout 12 years ago
Since the selected text is sent to Google in plain text via a regular HTTP connection, you shouldn't use it on confidential data.
WickyNilliamsabout 12 years ago
Been meaning to look into Automator ever since I got my mac. Does anyone have a good guide on all the features available?
xlevusabout 12 years ago
What would make this perfect, is a "QR Keyboard" that reads from the QR code and dumps it into any other input field.
Herald_MJabout 12 years ago
If you have an iPhone and Mountain Lion, you can just pass messages between devices via the Notes apps and iCloud.
pi18nabout 12 years ago
There's also a few apps that can copy and paste between devices. I use Any Send to pass links and PDF's around.
neilparikhabout 12 years ago
Can services be used on Firefox for Mac? It doesn't show up on my right click context menu.
peterhajasabout 12 years ago
&#62; Fortunately, OS X now has Services<p>This has been a feature for OS X for a long, long time.
ispekhovabout 12 years ago
Now go generate tons of QR codes and scan them all with Qriket to earn money.
yaabout 12 years ago
brew install qrencode<p><a href="http://fukuchi.org/works/qrencode/index.html.en" rel="nofollow">http://fukuchi.org/works/qrencode/index.html.en</a>
seivanabout 12 years ago
I love the hacker in you. :)
eliasmacphersonabout 12 years ago
can i get that in ascii please?
评论 #5337243 未加载
carignanboyabout 12 years ago
<a href="http://picturesofpeoplescanningqrcodes.tumblr.com/" rel="nofollow">http://picturesofpeoplescanningqrcodes.tumblr.com/</a>