Live data from Hacker News

Turn your browser into a notepad with one line

coderwall.com

151–160 of 186 posts

Re: Turn your browser into a notepad with one line

#151
post #96

Earlier quoted context omitted.

Interesting concept, but Facebook login + my (unique) real name (yes, there's only one of me in the whole world) + unencrypted PRIVATE journal with subconscious gibberish + possibly my email address = privacy hell. I'd rather install this thing on my private webserver.

The analysis that 750 words does is very unique and interesting. You don't have to connect it with Facebook or your real name. You may create an anonymous account. Personal computer are very prone to failure. You will have to save your information somewhere on the cloud. They all shady. It is a compromise that you have to make based on your best judgement.

Look, I wouldn't enter personal data anywhere on the internet. If I write 750 words a day, I write about personal things that could be clearly related to me (by name or by my company name). I can't take that risk. Not because the guy behind 750words is not trustable. I don't know him. But because I have no idea whether or not his webserver is secure enough, whether or not he stores his FTP password somewhere in plaintext on his mobile or his laptop.

It doesn't have to be him who is the weakest link in that security chain.

What I don't get from your posting is the second part. Personal computers aren't prone to failure at all. I never had a single HDD crash. I backup my data on a second HDD just in case. It's incredibly unlikely that my data is going to be lost and that the cloud is the only solution for that.

So, there's clearly no compromise for me. Rule is: No cloud, no internet service for private data. And heck, I don't even use any analytics software or other software on my company website that I cannot self-host.

Re: Turn your browser into a notepad with one line

#152

It's cute, but I can't help observing that we're what, 70 years into the computer age, and there's still no ubiquitous, small, fast, clean text editor present by default on all personal computers. (DO NOT speak to me of Notepad.exe) So discovering that 'by accident' web browsers can act as a simple (but huge, bloated and feature-starved) text editor seems like a big deal. Personally I keep a simple, tiny, old freewar…

"all" is tricky, there isn't a standard command on all computers to list the contents of a file, let alone edit. But even my WRT54G has vi installed on it, and you can expect to find emacs and vim on almost any *nix.

Re: Turn your browser into a notepad with one line

#153

That's pretty handy. In Chrome ctrl+b and ctrl+i bold and italics the text respectively. If I can get bullets that could be a nice replacement for the text editor I currently use for notes.

Anybody know if there are similar shortcuts in Firefox as well?

Re: Turn your browser into a notepad with one line

#155
post #79

After some mix-and-matching of the awesome code snippets posted in the comments, I came up with something easy on the eyes (with a nice little color transition (for webkit-enabled browsers): data:text/html, http://fonts.googleapis.com/css?family=Lato:100,200,300,400,... rel='stylesheet' type='text/css'> html { font-family: "Lato"; color:#e9e9e9; background-color:#222; } * { -webkit-transition: all linear 1s; }

Thank you. I've tweaked it to my preferences. I've gotten in the habit of writing with a black on light grey monospaced font. Removing the web font dependency (and the transition, again matter of taste) made the page snappier. data:text/html, html{background-color:#CCCCCC;font-family: Monaco, Consolas, "Lucida Console", monospace;font-size:14px;color:#424242;line-height:1.4;max-width:60rem;margin:0 auto;}body{backgro…

Love this version. It's like writing on nice paper.

Re: Turn your browser into a notepad with one line

#156

Ah shoot. If Chrome allowed localStorage to be accessible from file:/// then we could add save (CTRL+S) and automatic load using this: data:text/html, window.onload=function(){var a=document.body;a.innerText=localStorage.mydoc;a.addEventListener("keydown",function(b){b.ctrlKey&&83==b.which&&(localStorage.mydoc=a.innerHTML,b.preventDefault())},!1)}; Firefox will save it to localStorage but clear the local storage afte…

If you don't mind loading jquery I made a version which saves to OpenKeyVal. Just set your secret key.. https://gist.github.com/4672169

I forked yours and made it a JavaScript editor. You can use ctrl+j to execute what's in the buffer.

https://gist.github.com/4673043

Re: Turn your browser into a notepad with one line

#157
post #19

For even more fun, turn your notepad into an interactive JavaScript environment: data:text/html, Then you can upgrade it by pasting in something like this: this.onkeyup = function () { this.style.backgroundColor = 'white'; try { eval(this.innerText); } catch (e) { this.style.backgroundColor = '#FFAAAA'; } }

I forked minikomi's gist above that does something like this, except you use ctrl+j to execute what's in the buffer:

https://gist.github.com/4673043

Re: Turn your browser into a notepad with one line

#158
post #123

Earlier quoted context omitted.

For vim, I just open an unnamed buffer (:new). I think this is exactly the same as the scratch buffer in emacs.

The only differences being, when you close vim, the scratch buffer does not yield a save prompt, and also, if you open a scratch buffer, then close it, and then reopen it again with :Scratch during the same vim session, any leftover contents from before (but during that same vim session, of course) will be restored, which is neat/convenient. :) edit: misread your comment, thought you were comparing :new and :Scratch…

:new | set buftype=nofile

Re: Turn your browser into a notepad with one line

#159

This + Ruby syntax highlighting. https://gist.github.com/4666256

Thanks for this. Adding ace is a great idea!

https://gist.github.com/4670615

with support for Firefox 18 as well, and It comes with many languages and themes.

Re: Turn your browser into a notepad with one line

#160

Ah shoot. If Chrome allowed localStorage to be accessible from file:/// then we could add save (CTRL+S) and automatic load using this: data:text/html, window.onload=function(){var a=document.body;a.innerText=localStorage.mydoc;a.addEventListener("keydown",function(b){b.ctrlKey&&83==b.which&&(localStorage.mydoc=a.innerHTML,b.preventDefault())},!1)}; Firefox will save it to localStorage but clear the local storage afte…

If you don't mind loading jquery I made a version which saves to OpenKeyVal. Just set your secret key.. https://gist.github.com/4672169

[deleted]
Post reply on HN