Show HN: elegant open-source pastebin server (node.js & redis)
hastebin.com
hastebin.com
Quick question though, why redis vs something disk based? Are you worried that if this sees a lot of usage you'll hit memory limits? Seems like a great application for a disk based KV, or just plain SQL.
You can set the language by just changing the extension in the URL, if it guesses wrong.
the open source project also has an optional disk store you can use in place of redis (http://github.com/seejohnrun/haste-server), but my hosted version uses the redis store.
Thanks again!
Also, while I am entering a file, the edit box is only two lines long, and I can't see the handle to resize it. This is Safari 5.1.1 on Snow Leopard.
Looks nice!
will be fixed tonight
Assuming a 64 bit instance (that is more memory hungry) and that the average paste size is 512 bytes, every 2 million documents require 1GB (just tested with redis-benchmark).
This means that if you have a paste every minute, in order to use 1 GB of memory you need to wait 4 years.
Many problems that at a first look appear to be hard to treat with an in-memory DB at a closer look appear quite addressable.
That said this is the kind of problem where the working set is very small compared to the whole set of documents stored, and where documents are rarely written and often accessed in a read only fashion, so a *SQL DB would work super well for that use case.
I Redis server could form a very good addition in order to perform real time stats about the accesses to the document: number of times the document was read, a sorted set for latest created documents, top documents for this month by page views, and so forth.
Thanks for the research, and look forward to more coming out in the way of statistics soon!
There's no affordance suggesting what to do. If I start typing, I only get two lines of visible text. If I enter more than two lines, the top line(s) scrolls out of view. this doesn't seem to be intended behavior given all the "white" space on the page. When saved, a multi-line bin seems to work normally.
In a quick check, it seems all resources are loading. Safari 5.1.1; OS X 10.7.2. (Tried with extensions, e.g., AdBlock, off too.)
The current design targets users who're familiar with other bin sites, and is less friendly to new users.
more info: http://hastebin.com/about.md
Would be useful if there was an option to enable line numbering. Not sure if this would go against the minimalist style you're going for though.
dillinger.io
Dillinger is also 100% open source:
github.com/joemccann/dillinger
i'm definitely gonna check out dillinger
---
You can even take this a step further (on OSX) and cut out the last step of copying the URL with:
`cat something | haste | pbcopy`
After running that, the STDOUT output of `cat something` will show up at a URL which has been conveniently copied to your clipboard.
That's all there is to that, and you can install it with `gem install haste` right now.
-----
Out of curiosity, why is that only possible on a Mac OS X setup with the Ruby gem? Is it only because Ruby is pre-installed?
gem install haste cat something | haste | xsel
I'll add that to the /about.md page tonight
Thanks - glad you like it! :)
Okay, they know javascript, that helps...
But it makes node.js feel slick... a great marketing trick.
https://github.com/jashkenas/coffee-script/wiki/Text-editor-...
EDIT: Sorry, I should post this as a Github issue instead...
There's just one little glitch : In IE9, icons are not shown correctly and a javascript error is raised whenever you try to perform an action , or visit a url you just "generated"
The favicon is a great point and I'll get one together ASAP
However, when I type/paste i can see only the last line of text, it's somehow confusing. Why not to make textarea take whole height?