News for hackers. Stuff that matters.
Re:Show HN: Private front-end code playgrounds by frontendlane on Sunday September 15, 2019 @08:14PM (#20980229)
Super excited to share this small project I built over the weekend. This is a front-end code playground inspired by my recurring need to quickly test something out in a pristine environment i.e. new tab.

- Supports HTML, CSS, JavaScript - Easy to share with others 1. CMD/Control + S 2. Share the URL - Opens in an instant - Private by design (nothing is stored because there is no server) - No tracking - No account to manage

My first submission on Hacker News. Yay!

Re:Show HN: Private front-end code playgrounds by ghinda on Tuesday September 17, 2019 @03:14AM (#20992505)
Great work! Have you found a way to compress/shorten the urls?

I built something similar[1] a while ago, but the urls are still too long for sharing without a shortener. I'm using lz-string[2].

[1] https://www.siloz.io

[2] https://github.com/pieroxy/lz-string

Re:Show HN: Private front-end code playgrounds by quickthrower2 on Tuesday September 17, 2019 @05:07AM (#20993114)
I like it - and I think this will be my go to.

You see I don't often need to save stuff I play with, I almost never need to share, and if I want JQuery there is a CDN, so I will take the simplicity and fast loading of your site over other playgrounds out there.

I've linked to you from "Utilities" page in the site in my profile.

Re:Show HN: Private front-end code playgrounds by myfonj on Tuesday September 17, 2019 @05:51AM (#20993316)
For exactly same purpose I am grooming self-contained HTML Sandbox "datauri app" [0] living in my bookmarks that too retains its state in location (#hash) so is copypastable to other browsers. I like to load preview to isolated iframe and have single editor. (Not as golfed as xem's ([1]) but it's mine and I like its few extra features.)

[0] https://gist.github.com/myfonj/c8ce74bf549e19600026ce9022388... [1] http://xem.github.io/miniCodeEditor/

Re:Show HN: Private front-end code playgrounds by jpincheira on Tuesday September 17, 2019 @05:25AM (#20993211)
First off, congrats on creating something on your own, and making it to the top of HN. It's not many people that get here by doing something on their own.

I must say that for my sporadic needs, this would be still too basic. My go-to tool has been for years https://jsbin.com but it's interesting to me how other tools have been able to monetize on this category.

Re:Show HN: Private front-end code playgrounds by d--b on Tuesday September 17, 2019 @04:22AM (#20992878)
This is great. Not sure why the copy command doesn't succeed. I had to go in the source code to get the url.
Re:Show HN: Private front-end code playgrounds by onion2k on Tuesday September 17, 2019 @06:41AM (#20993507)
One feature I really like to see in projects like this is the ability to break the 'result' window out in to a separate tab. Codepen does it (the 'debug' mode), but it loses the live refresh. I think Codesandbox can do it too. It makes them much more useful.
Re:Show HN: Private front-end code playgrounds by Narretz on Tuesday September 17, 2019 @07:49AM (#20993857)
Glitch.io does live reload in a different tab
Re:Show HN: Private front-end code playgrounds by nestorherre on Tuesday September 17, 2019 @08:21AM (#20994067)
Isn't something like jsfiddle, codepen, etc... exactly the same?

Not to disminish your effort and result, but you say that you had a "recurring need", well, that need was already solved.

Re:Show HN: Private front-end code playgrounds by fouc on Tuesday September 17, 2019 @04:49AM (#20993034)
I like the page layout! It's a lot smarter than most code playgrounds are. It's nice to be able to see everything at a glance.
Re:Show HN: Private front-end code playgrounds by grenoire on Tuesday September 17, 2019 @05:48AM (#20993301)
This is all well and good but isn't there a limit on the length of URLs? Or does that simply not apply to blob data links.
Re:Show HN: Private front-end code playgrounds by myfonj on Tuesday September 17, 2019 @06:15AM (#20993409)
There is, but nowadays it is quite generous. Firefox for example by default accepts up to 64KB long bookmarks [0].

[0] via https://www.reddit.com/r/firefox/comments/b6fa95/bookmark_lo...

Re:Show HN: Private front-end code playgrounds by antigirl on Tuesday September 17, 2019 @05:20AM (#20993176)
neat, this is my go to for something more complicated, i.e reat or even node https://codesandbox.io
Re:Show HN: Private front-end code playgrounds by alessioalex on Tuesday September 17, 2019 @03:38AM (#20992610)
Ctrl + Enter doesn't do anything. (Linux)
Re:Show HN: Private front-end code playgrounds by frontendlane on Tuesday September 17, 2019 @04:19AM (#20992863)
Fixed. Thanks for bringing it to my attention!
Re:Show HN: Private front-end code playgrounds by emilfihlman on Tuesday September 17, 2019 @02:43PM (#20998701)
ctrl+s nor clicking copies anything to clipboard for me.