12 ms·
Hashify.me - store entire website content in the URL
- Groxx 16y agoA fantastic abuse of technology. That's one heck of a URL.
- random42 16y agoWhy abuse?
- JonnieCache 16y agoPerhaps 'misuse' would have been better. It's certainly that.
- Groxx 16y agoBecause "URI" stands for "Uniform Resource Identifier" (or URL for "Locator"), not "Resource". The intent is for it to be a pointer, not the value at the location. And, if you were to use the URI as the content (instead of chunking and shrinking it via Bitly), you'd be duplicating that content on every page that links to it. And in your browsing history, by merely viewing it. edit: oooh, another thought: you're essentially uploading the content of the page to view it.
- pbhjpbhj 16y agoThere's an interesting copyright question in there somewhere too. If the URL for my document is the document then sharing the link is infringing my copyright, or something.
- chii 16y agothere is such a thing as fair use in copyright law (at least, in australia and US and most major western states).
- bct 16y agoI don't think there's any abuse here (after all, data: URIs exist). A value is just another kind of pointer. The important thing is that the identified resource is unambiguously identified.
- dusklight 16y agoThis is basically stealing bandwidth from sites like bit.ly, getting them to host your webpages for you. There might be legitimate uses for this, right now I can't think of one. Clever hack though.
- WesleyJohnson 16y ago
- pstack 16y agoI can't recall the last thing that made me giggle as much as realizing what they were doing. I can't see any time I'd really use this, but the audacity is inspiring.
- danielsoneg 16y agoOh, Bit.ly's gonna _Love_ you guys. Seriousy, though - awesome hack.
- gojomo 16y agoWith a name like 'Hashify', I'm surprised they don't also offer the option of putting the content into the '#fragment' portion of the URL. Then, not even the hashify.net site would need to receive and decode the full URL; they'd just send down a small bit of constant Javascript that rebuilds the page from the #fragment.
- hashify 16y ago> they'd just send down a small bit of constant Javascript that rebuilds the page from the #fragment. That's _exactly_ what the site does. Everything happens client-side. nginx serves a single index.html for every request. ;)
- gojomo 16y agoThen why put the encoded content in the /path-info rather than the #fragment?
- AndyKelley 16y agoIt looks nicer.
- metamatt 16y agoAnd gratuitous roundtrips are fun, too :P (You're uploading the data in order to then convert it client-side. Groxx noticed this too: http://news.ycombinator.com/item?id=2464347 http://news.ycombinator.com/item?id=2464347)
- gbhn 16y agoThe OP is saying that with a #fragment, the browser wouldn't even need to send the server the doc contents. (Since they aren't used anyway, there's obviously no use in doing so.)
- dpcan 16y agoI see this as a remarkable answer to the problem of needing to view a cached version of the website. For example, what if a URL were posted to Hacker News, but after the URL was a ?hasifyme=THEHASH, where THEHASH was the Hash of the website linked-to. This way, if the URL could not be loaded because the server load was to high, you could just forward the URL to Hashify.me and the cache of the plain text from the website would still then be readable. Boom, instant cache of the website content stored right in the URL!!!!
- zipdog 16y agoClever use. But do you think it would scale? Doesn't it rely on bit.ly and/or hashify.me being able to convert the URL into a readable page?
- pkandathil 16y agoI assume hashify.me stores the value associated with the hash. I guess for this to work well. Dont you need Hashify to provider a service where you pass in hashcode and it returns the HTML to you. You just wrap the call with good old JSONP and you are good to go.
- hashify 16y ago> I assume hashify.me stores the value associated with the hash. Not so. hashify.me has no server-side component (beyond nginx serving three static files). _bit.ly_ kindly provides the hash table. ;)
- yakto 16y agoToo bad IE gets unhappy after 2K (http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url http://stackoverflow.com/questions/417142/what-is-the-maximu...)
- Florin_Andrei 16y agoSquid too (with default settings). ERROR The requested URL could not be retrieved While trying to process the request: GET http://hashify.me/IyBIYXNoaWZ5CgpIYXNoaWZ5IGRvZXMgbm90IHNvbHZlIGEgcHJvYmxlbSwgaXQgcG9zZXMgYSBxdWVzdGlvbjogX3doYXQgYmVjb21lcyBwb3NzaWJsZSB3aGVuIG9uZSBpcyBhYmxlIHRvIHN0b3JlICoqZW50aXJlIGRvY3VtZW50cyoqIGluIFVSTHM/XwoKIyMgRG9jdW1lbnQg4oaUIFVSTAoKSGFzaGlmeSBpcyBkaWZmZXJlbnQgZnJvbSB2aXJ0dWFsbHkgZXZlcnkgb3RoZXIgc2l0ZSBvbiB0aGUgV2ViIGluIHRoYXQgKipldmVyeSBVUkwgY29udGFpbnMgdGhlIGNvbXBsZXRlIGNvbnRlbnRzIG9mIHRoZSBwYWdlKiouCgpUaGUgYWRkcmVzcyBiYXIgdXBkYXRlcyB3aXRoIGVhY2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dodHMgYW5kIHN1Z2dlc3Rpb25zLCBjb250YWN0IG1lIG9uIFR3aXR0ZXI6IFtAaGFzaGlmeV1bOF0gb3IgW0BkYXZpZGNoYW1iZXJzXVs5XS4gRm9yIGJ1ZyByZXBvcnRzIGxvbmdlciB0aGFuIDE0MCBjaGFyYWN0ZXJzLCBoYXNoaWZ5IG1lIGEgZGVzY3JpcHRpb24gb2YgdGhlIHByb2JsZW0uIDspCgoKWzFdOiBodHRwOi8vZW4ud2lraXBlZGlhLm9yZy93aWtpL0Jhc2U2NApbMl06IGh0dHA6Ly9lY21hbmF1dC5ibG9nc3BvdC5jb20vMjAwNi8wNy9lbmNvZGluZy1kZWNvZGluZy11dGY4LWluLWphdmFzY3JpcHQuaHRtbApbM106IGh0dHBzOi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuL0RPTS93aW5kb3cuYnRvYQpbNF06IGh0dHA6Ly9jb2RlLmdvb2dsZS5jb20vcC9iaXRseS1hcGkvd2lraS9BcGlEb2N1bWVudGF0aW9uCls1XTogaHR0cDovL2hhc2hpZnkubWUvdW5wYWNrOmdZaTJJZSxnNGZwdGUKWzZdOiBodHRwczovL2JpdGJ1Y2tldC5vcmcvZGF2aWRjaGFtYmVycy9zaG93ZG93bi5qcwpbN106IGh0dHBzOi8vYml0YnVja2V0Lm9yZy9kYXZpZGNoYW1iZXJzL2hhc2hpZnkubWUKWzhdOiBodHRwOi8vdHdpdHRlci5jb20vaGFzaGlmeQpbOV06IGh0dHA6Ly90d2l0dGVyLmNvbS9kYXZpZGNoYW1iZXJz http://hashify.me/IyBIYXNoaWZ5CgpIYXNoaWZ5IGRvZXMgbm90IHNvbH... HTTP/1.1 Host: hashify.me Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16 Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 The following error was encountered: Invalid Request Some aspect of the HTTP Request is invalid. Possible problems: Missing or unknown request method Missing URL Missing HTTP Identifier (HTTP/1.0) Request is too large Content-Length missing for POST or PUT requests Illegal character in hostname; underscores are not allowed
- mlinksva 16y agoNice hack, though odd name given that no hashing occurs.
- techscruggs 16y agoBase64 is a two-way hash function
- jerf 16y ago"Two-way hash function" is an oxymoron. The fundamental characteristic of a function that makes it a hash function is the inability to (feasibly) reverse it. Base64 is an encoding.
- ubershmekel 16y ago"Two-way hash function" is a contradiction. An oxymoron is a figure of speech that combines contradictory xterms.
- masterzora 16y agoI agree with your final conclusion, that Base64 is an encoding, but it is also a hash function and hash functions can very well be two-way. In fact, the trivial hash function just maps data to itself, which is trivially reversible. However, we do want our cryptographic hash functions to be trapdoors to be of use.
- ay 16y agoTrapdoor function means the function is easy to calculate in one direction, but is difficult to calculate in the other direction without knowing a special bit of information that allows this calculation much easier. What would a trapdoor value be for SHA1 ? What I can agree is that I would like the cryptographic hash to be a one-way function, yes. But not trapdoor functions, please :-) (and can you point to the definition of the hash functions that you described ? I'm curious).
- theoa 16y agoHashify.me seems to be overloaded for the moment. Nevertheless a brilliant and delightful concept!
- hashify 16y ago> Hashify.me seems to be overloaded for the moment. Here's what I'm seeing in my browser console: { "data": [ ], "status_code": 403, "status_txt": "RATE_LIMIT_EXCEEDED" } I should have included appropriate error handling for this! Everything except shortening continues to function, though.
- riobard 16y agoWhat about gzipping the content first?
- gojomo 16y ago...and with a large library of switchable preset dictionaries for common document scenarios...
- antimatter15 16y agoI hacked together an encrypted (aes 256) read/write "database" once with the bitty API as the persistence backend. However, this site disappoints me, it doesn't seem to do anything other than what a data URL can do, except it's vulnerable to downtime because of a centralized website. Edit: for those of you unfamiliar with what a data URL is. You an store a HTML or image document using a URL like data:text/HTML;base64,hashifystuffhere
- bct 16y agoWhat are the differences between this and a data: URI? Just the shortener and that it can use out-of-band Javascript for the editor?
- kqueue 16y agoThis is going to break in cases where the request line grows above 8k-16k. Many browsers/proxies implement limits on headers/request lines, for good reasons. It's a very cool idea though.
- jurjenh 16y agoThis is quite clearly covered in the actual document! > For longer documents, Hashify splits the contents into as many as 15 chunks. The chunks are then Base64-encoded and sent to bit.ly in a single request. The bit.ly hashes contained in the response are then "packed" into a URL such as http://hashify.me/unpack:gYi2Ie,g4fpte http://hashify.me/unpack:gYi2Ie,g4fpte. Finally, this URL is itself shortened.
- sweis 16y agoThis is vulnerable to XSS: http://hashify.me/PGlmcmFtZSBzcmM9ImphdmFzY3JpcHQ6YWxlcnQoJ1dlYWsgc2VjdXJpdHknKTsiPgoK http://hashify.me/PGlmcmFtZSBzcmM9ImphdmFzY3JpcHQ6YWxlcnQoJ1...
- Cushman 16y agoThat's a feature. You can encode an entire webpage, including JavaScript, and, yes, including alerts. As long as they don't have user accounts or database access or such, XSS doesn't let an attacker do anything meaningful. It's not weak security, it's just how the site works. Edit: To point out the obvious, your iframe trickery is not necessary. Script tags are not escaped, nor are event attributes: http://hashify.me/PGRpdiBvbmNsaWNrPSJhbGVydCgnVGhpcyBpc25cJ3QgcG9vciBzZWN1cml0eSwgaXRcJ3MgYSB3ZWJwYWdlIHdpdGggSmF2YVNjcmlwdC4nKTsiPkNsaWNrIGhlcmUuPC9kaXY+Cg== http://hashify.me/PGRpdiBvbmNsaWNrPSJhbGVydCgnVGhpcyBpc25cJ3...
- hashify 16y ago> That's a feature. Agreed! One can always link someone to a static HTML page with <script>alert('fu')</script> in the body, but no one would tag that "XSS". Does hashify.me make it easier to send annoying alert messages to your friends? Sure. Annoying, but no more harmful than sending them to the static equivalent.
- sweis 16y agoFair enough. It's similar to embedding third-party gadgets for things like iGoogle. However, in practice that content is sanitized. Note there are risks to hosting arbitrary Javascript beyond stealing cookies. For example, you can steal browser history, discover NAT IP addresses, scan intranet ports, etc. Here's a presentation by Jeremiah Grossman covering some of these attacks: http://www.blackhat.com/presentations/bh-usa-06/BH-US-06-Grossman.pdf http://www.blackhat.com/presentations/bh-usa-06/BH-US-06-Gro... Of course, attackers can host malicious content anywhere they control. I could just as easily send someone a bit.ly link to a malicious site I control.
- ecaradec 16y ago
- micheljansen 16y agoAt my workplace, this completely freaks out our corporate proxy, so no go :(
- kwantam 16y agoLast week on a whim I whipped up a URL shortener that expires the forwarded URL after one week[1]. Using that plus hashify, you can essentially make expiring web pages. [1] pygm.us
- hElvis 16y agoI am just coding the same thing right now (began a week ago). Also had the idea to use bit.ly as shortener (because of its api) and make use of multiple shortened links to store the data. Right before looking at HN I was doing some research for a good js compressing algo. On the one hand i am a bit disappointed (that i am too late), but on the other hand hashify.me is made far better I could make it. Great realisation.
- hashify 16y agoIt's interesting that you say that. For some reason I felt under immense pressure to get this out quickly, but I wrote that off as paranoia (should've heeded Kurt's warning). Now that it _is_ out in the wild, I can't wait to see what people do with it slash build upon it.
- hElvis 16y agoWell, it really _was_ out before in many ways, but not in such a nice one (formated html etc.). Btw, do you have a base64 online converter and read my code six days ago? Just "kidding".
- shazow 16y agoHere's a Python shortcut: Instead of... from base64 import b64decode b64decode(foo) You can do... foo.decode('base64') Encoding works too. As well as zip (foo.encode('zip')).
- mahmoudimus 16y agoIt is worth noting there's a difference in the base64.b64encode function, vs the default MIME Base64 codec on strings[2]. Per RFC2045[1]: (Soft Line Breaks) The Quoted-Printable encoding REQUIRES that encoded lines be no more than 76 characters long. If longer lines are to be encoded with the Quoted-Printable encoding, "soft" line breaks Due to the insertion of these soft-line breaks, encoding is not the same, as you can verify yourself: import os import base64 import unittest class Base64Test(unittest.TestCase): def test_long_string_base64_decoding_and_encoding(self): byte_seq = os.urandom(500) mime64_encoded = byte_seq.encode('base64') self.assertNotEqual(base64.b64encode(byte_seq), mime64_encoded) self.assertEqual(base64.b64decode(mime64_encoded), mime64_encoded.decode('base64')) if __name__ == '__main__': unittest.main() Decoding, as you can see above, is fine. This makes a difference when encoding a really long string in an HTTP header. [1] http://www.ietf.org/rfc/rfc2045.txt http://www.ietf.org/rfc/rfc2045.txt [2] http://docs.python.org/library/codecs.html#standard-encodings http://docs.python.org/library/codecs.html#standard-encoding...
- deleted 16y ago[deleted]
- blantonl 16y agoI could see this as a very useful implementation for HTML5/Mobile Web sites. Consider the user experience for the target site on a mobile platform. You have already loaded the site on your mobile device before even taking action, so when you click the link the response is much faster than requesting the site at the click.
- petegrif 16y agoextremely cool
- paolomaffei 16y ago"A hash function is any well-defined procedure or mathematical function that converts a large, possibly variable-sized amount of data into a small datum" Hashify is not really a hash, is it?
- jdoliner 16y agoNo hashify is not really a hash function. Since a hash function takes large data to small data it is implicitly not invertible. Hashify's URLs obviously are.
- HelloBeautiful 16y agoEnd users are given bit.ly URL with a hash.
- angusgr 16y agoSplitting hairs because it's closer to a common understanding, but bit.ly URLs aren't hashes they are just alphanumeric IDs. The difference is that AFAIK there's no algorithm to take a URL (plus or minus a username) and give you a bit.ly ID, short of looking it up at bit.ly.
- jholman 16y agoAnd the relationship is this: 'path' element of bit.ly URLs are keys in a key->value mapping (where the value is your target URL), and one of the best implementations of a key->value mapping is a hash-table. (At least, it's good for in-memory implementations... I suppose that on disk something a little more elaborate may be called for?) Historically, the authors of Perl and Ruby (and WP tells me, Common Lisp?) decided to confuse the interface with the implementation, and use "hash" or "hash table" to refer to the mapping, and not ever Perl hacker has a Computing Science degree, so now we live in a world of people who think that "hash" means the thing that bit.ly does for you. Once again, Larry Wall Ruins Everything. :P
- 16y ago
- iamwil 16y agoI wonder if the equivalent of a quine for this is possible.
- jules 16y agoSo in effect, you're using bit.ly as a webhost. Url shorteners might not be completely useless after all.
- pedalpete 16y agoClearly this is awesome, I'm curious as to what lead you to build it? Understanding that you weren't solving a 'problem', but you've created something really compelling here. Care to give a peak into how you came up with it?
- hashify 16y agoA month ago, all the developers in the office spent two days working on interesting small projects, the idea being that at the end of that time we'd have a bunch of cool shippable features. Though it was encouraged to work on useful, sensible things, this was not a requirement. Anyway, I felt great until 4pm on the Friday, when we presented our creations. Afterwards, I felt flat (as one often does after meeting a deadline or finishing a series of exams). I didn't want the excitement to end. As I was walking home I had an idea. For some reason I wanted to share thoughts in 72pt Helvetica. I didn't want to broadcast them (I was melancholic after all), but I felt compelled to express them visually. I began to think about how this might be done. The Web seemed like the obvious platform. I wondered whether it could be done without a database. I remembered something I had heard on a podcast about a site that allowed one play musical notes on a computer keyboard, and would encode these in the URL for easy playback. This seemed a lot more interesting than sharing my moody thoughts, and now that I had something cool to work on I no longer felt the need to do so anyway. I think I spent 40 hours working on it that first weekend (yes, I was consumed). I truly believed that I could ship it before showering and leaving for work on Monday! Doing so would have been a mistake – I'm pleased that I spent several weeks ironing out the kinks and integrating with bit.ly and Twitter.
- aj700 16y agowould be a good text "host" but needs clones, so that when it disappears in a few years I can still easily convert my urls back into the document therein. that's the one problem these text host sites have. they never last. this gets around this by hosting nothing, merely converting, but still. and using bit.libya. i dont trust it. isn't this also somewhat censorship resistant. since the hashify url without its bitly can be put anywhere on the web that is writable, thus making multiple copies available in a covert way.
- powera 16y agoThis is pointless. It's impossible to create two pages that link to each other, for one. Also, as noted, most browsers won't allow URLs greater than 2k in size.
- petercooper 16y agoThis research is a few years old but, hopefully, things should be even better by now: http://www.boutell.com/newfaq/misc/urllength.html http://www.boutell.com/newfaq/misc/urllength.html .. Safari, Opera, and Firefox all go over 80k. I found another source for Chrome that says they "could not find any limits on Chrome and Safari". Nonetheless, it's tricky because you have no idea if proxies in the middle will be able to cope, mobile clients, and all sorts of things.. so you're right in the sense that it's pointless (if you want it to be universally acceptable ;-)).
- xorglorb 16y agoIn my own (very imprecise) testing, Chrome seemed to freeze around 215k characters. I found that my web server started throwing 413s after only about ~30k characters.
- nollidge 16y agoDon't know about the browser, but my work proxy won't allow it.
- brndnhy 16y agoCareful. Apache responds with an HTTP code 414-Request URI Too Large once the URI reaches around 8K in length. Default limits exist in several load balancers as well.
- codejoust 16y agoFinally, an easy and quick way to decode base64 hashes.
- sameerb 16y agoIT WILL BE A GAME CHANGER IF THEY CAN ENCODE A WHOLE FILE LIKE .TORRENT IN AN URL
- mindctrl 16y agoIt's a massive keylogger.
- strayer 16y agoIsn't it a "page" or "document", and not a "website"?
- sbierwagen 16y agoSo it's a reimplementation of data URIs, except it depends on two different sites being up and responding to replies, so it lacks even the tiny amount of usefulness data URIs have? I can't think of a single use case where you would go, "Ah ha! Hashify would work perfectly for this!"
- jamesgeck0 16y agoOne site; once you have the URL you don't necessarily need Hashify to decode it for you. Actually, it seems like Hashify is simple enough that it could be made to work offline using HTML5 without much work.
- yalogin 16y agoWhat is the purpose of this? The URL is already pointing to the store - the actual site which hosts the page. Instead now we have a shortened URL which stores the document. So they just took away the distributed nature of the URL and put it all in one store (bitly).
- aneth 16y agoHow long before the bit.ly namespace is exhausted?
- Steve0 16y agoThis reminds me of the old tiny-url file system: http://tech.slashdot.org/story/05/10/25/0350222/TinyDisk-A-File-System-on-Someone-Elses-Web-App http://tech.slashdot.org/story/05/10/25/0350222/TinyDisk-A-F...
- DanWaterworth 16y agoThis is sweet. It would actually be possible to create a database using bitly entirely in javascript. It would be read-only for clients and read/write for webservers. You could even make it ACID compliant. I might have a go.
- EGreg 16y agoSo basically, the URLs are files, and copying/pasting them is like copying/pasting encoded data. It is the same as data: urls actually, except maybe for browser security, which is pretty irrelevant for this anyway. Actually, now I am wondering if an iframe src could be a data: url in browsers. If so, that could be interesting! Showing content without hitting the server. Probably not though, because of cross-domain security again. Any ideas?
- nrkn 16y agoOh dear. This is like some kind of sick, twisted Rube Goldberg machine... Take entire text of Bram Stoker's Dracula Chunk into 123 parts Data URI encode each part Generate a TinyURL link for each data uri (thanks for having an API guys) Embed the TinyURL links in the Hashify Markdown editor using object elements Curses! Even just the objects takes it over the limit. It has to be done in two parts. Create two Hashify pages. Part 1: http://bit.ly/havNYE http://bit.ly/havNYE Part 2: http://bit.ly/feoYrR http://bit.ly/feoYrR Works in Firefox and Safari. Chrome, Opera and IE9 don't like it.
- hashify 16y agoYou, my friend, are one sick individual. Very cool!
- delitescere 16y agoHere ya go mate, in one page: http://tinyurl.com/hashcula http://tinyurl.com/hashcula hashify allows style tags :-)
- Enideo 16y agoA similar technique is used already on the website http://www.wondersay.com http://www.wondersay.com Here the URL path is the text to animate and the fragment hash stores the settings. Bitly is also used to hide the contents of the URL (and hence the messages). This is clever, in that the entire content of the website is not stored in a database, but in external links. Obviously the biggest problem with this technique is having bots crawl your site, so Google's #! convention is used.
- wakeup 16y agoMost retarded idea ever...
- juskotze 16y agoembedded images works. what would this be the solution for? http://hashify.me/aW1hZ2Ugb3ZlciBoZXJlIDxpbWcgc3JjPSdkYXRhOmltYWdlL3BuZztiYXNlNjQsaVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQURJQUFBQXlDQVlBQUFBZVA0aXhBQUFBQVhOU1IwSUFyczRjNlFBQUFBUm5RVTFCQUFDeGp3djhZUVVBQUFBZ1kwaFNUUUFBZWlZQUFJQ0VBQUQ2QUFBQWdPZ0FBSFV3QUFEcVlBQUFPcGdBQUJkd25McFJQQUFBQVVwSlJFRlVhRVB0MlVzT3d5QU1CRkI2LzNQMG5DbU9na1FqZmdiYkRJaElyTkl1bnNZMkpQbGNYM2U1SFM2QzdMRGNEb2k3cWc0RXJDUlBJbWdsZVJJNWlVZ1BDZWYzUWIvV0xxMEhzUzRrQWhCaVBVZ0NzQjZrZ0ZnamtRcmdUc1JmMk0xZVE5d0VVaUJQclJZRTlOUnFBVHdwaEViSFM2UUZrZmtOVG8rVUVGRXZ4Q25nSlZKRDFKS0NhUFpSeEhOMm0xdGFPVVJES2IxUDMzTWdRaW5FR0h1SUFzTCtMY29Jb3ZJY1k1ZUlJc0l1RVdXRURjUUFvUTh4UXN5REpBNTlmMGVQamhjVWVzMWUydXh5OXpvQVlTL1JnUmdqZEVwckFrSWVNZ2toQzVtSWtJUDBJT2cvQTgydGMvcE5RUlJHYkFrK1ByVjYwaEJNUW1iOGdpREdlZ1FJSVE4cDlZVkNPWTAvSVhMVFVFYjBKY0pGQ0kvWjNPVGlUeTN1cURWSWc1OElOdzBqQkgxVTRDWENTY01Rd1lOd0VCWjk0VE1nUUZodGlhQ1YxQXZSbmdoU0dna0VRWDVLWEV5c2NGd213QUFBQUFCSlJVNUVya0pnZ2c9PScgYWx0PSdFbWJlZGRlZCBJbWFnZScgLz4gcGFzdCBpbWFnZQ== http://hashify.me/aW1hZ2Ugb3ZlciBoZXJlIDxpbWcgc3JjPSdkYXRhOm...
- mumrah 16y agoAlternatively, you can use the Data URI Scheme like so: >>> "<h1>Hello, World!</h1>".encode('base64').strip('\n') 'PGgxPkhlbGxvLCBXb3JsZCE8L2gxPg==' Paste this into your location bar: data:text/html;base64,PGgxPkhlbGxvLCBXb3JsZCE8L2gxPg== Works in Chrome 10.0
- measure2xcut1x 16y agoThe client side shorten request to bitly.com exposes the bitly credentials.
- yahelc 16y agoPar for the course in any JSONP/CORS implementation.
- 9ec4c12949a4f3 16y agoRequest denied by Firewall HTTP proxy. Reason: request URL path too large
- rudenoise 16y agoVery cool idea, it's something I can think of a bunch of cool uses for. Will definitely be looking into it. One downside came when I tried bookmarking with Delicious (hit the url length limit, truncation would break it). But great for shorter content.
- hashify 16y agoBookmark the bit.ly URL, perhaps?
- prassarkar 16y agoHashify + pen.io and you've got a great service. Hashify gets a pretty UI. pen.io removes the need for a DB.