News for hackers. Stuff that matters.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by lostintangent on Friday January 22, 2021 @10:41AM (#25872563)
Very cool! I maintain a VS Code extension that allows creating, editing and commenting on gists, directly within the editor: https://aka.ms/gistpad. I’d be interested to explore an integration here, since it would be cool to author gists in your existing dev tool, and then share/publish them to gist.cafe.

I also maintain a VS Code extension for building CodePen-like playgrounds, which can either be stored locally, or in gists: https://aka.codeswing. So it feels like there’s some pretty cool opportunities to work together :)

Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by mythz on Friday January 22, 2021 @10:45AM (#25872604)
Happy to collab on something like this! Can reach/DM @demisbellot on twitter.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by cashewchoo on Friday January 22, 2021 @10:37AM (#25872526)
Barely-related, but I love the .cafe TLD, I own two of them myself. I know the new TLDs were kinda an unpopular move but honestly some of them do lend a certain connotation to your website/product, since your domain is frequently a key part of your brand. .cafe, I think, makes your product feel casual, approachable, semi-social (it's like one step louder than a library), and trendy. Since, yknow, coffee is always trendy.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by mythz on Friday January 22, 2021 @10:43AM (#25872583)
Love it too! Super sweet + short cool sounding domains FTW! I've also recently was able to nab apps.cafe - just need to do something with it :)
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by crazypython on Friday January 22, 2021 @09:54AM (#25872103)
See also: Website that runs code in arbitrary programming languages https://tio.run/
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by petterrasmussen on Friday January 22, 2021 @10:46AM (#25872624)
And another one, in Rust: https://github.com/glotcode/docker-run
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by Mobleysoft on Friday January 22, 2021 @10:21AM (#25872355)
Nice work. Tabbed for further analysis. Where is the Gist code running, say for a console app? Could I use this to securely demo new concepts to long term clients using their privileged data without their in-house IT people raising valid infosec concerns? If so, I could see this being very useful. Is this the early stages of a new ServiceStack offering, or more of an interest driver? Certainly motivated me to click through to learn more about ServiceStack's products. Also tabbed for further analysis.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by mythz on Friday January 22, 2021 @10:33AM (#25872492)
> Where is the Gist code running, say for a console app?

In a Docker Container under a restricted user.

> Could I use this to securely demo new concepts to long term clients using their privileged data without their in-house IT people raising valid infosec concerns?

Yep! you can download the same Docker Container gist.cafe uses to run a local instance: https://gist.cafe/#local

The code is running in a Docker container under a restricted user which their in-house IT can further isolate by running the local container instance in an isolated server.

> Is this the early stages of a new ServiceStack offering, or more of an interest driver?

Nope something created for fun which we needed to create to host Live examples in our own docs ourselves, which IMO others needing to do something similar would find useful. I basically had to do a rewrite of https://github.com/ServiceStack/Gistlyn which did something similar but was tied to .NET Framework and used App Domains which aren't available in the x-plat .NET 5.0 so as part of the redesign & rewrite to use separate processes it was easy to extend to add support for multiple other languages.

> Certainly motivated me to click through to learn more about ServiceStack's products

Awesome!

Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by jp1016 on Friday January 22, 2021 @10:52AM (#25872684)
Cool, I have created codekeep to organize and store snippets like gist. its like google keep but for code snippets. , you can tag snippets with labels and organize snippets into folders. running gists is a great idea
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by TriNetra on Friday January 22, 2021 @02:06PM (#25874939)
@mythz nice work!

BTW, I've been working on building a security framework for .NET web apps (site not yet launched so not linking here) – it comes with several enterprise-grade security mechanisms (like automatic record/property-level permit checks for request data, entity suspension etc.).

We're fully supporting ServiceStack (both .NET Core and Framework).

Would you be open for some sort of collaboration?

Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by mythz on Friday January 22, 2021 @09:33PM (#25879004)
Can you send more info about your FX + the collab you have in mind to [email protected]
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by TriNetra on Saturday January 23, 2021 @03:53AM (#25880762)
Will do, thanks!
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by sitkack on Friday January 22, 2021 @09:54AM (#25872101)
For those that are confused, this is a serverless type of pastebin where it creates an endpoint that executes the program like a cgi script.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by mythz on Friday January 22, 2021 @10:04AM (#25872198)
Where the pastebin is your own GitHub Gist (https://gist.github.com), which you can view or host from https://gist.cafe/<gist-id>
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by d--b on Friday January 22, 2021 @09:50AM (#25872059)
I have spent at least 3 minutes on that website. I still have no idea what this is about...
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by giancarlostoro on Friday January 22, 2021 @10:05AM (#25872210)
If you don't know what gists are from the get-go then that's where I'd start. Gists are a separate feature of GitHub where you can share code like if it's pastebin or other similar services, but tied to your GitHub account. This enables you to execute code from gists, which can be written in dozens of languages.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by mythz on Friday January 22, 2021 @10:07AM (#25872232)
This! and GitHub lets you basically create your own gists of anything at https://gist.github.com
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by giancarlostoro on Friday January 22, 2021 @10:29AM (#25872440)
I use gist personally from time to time to document things I've had to do, though I wish I did it more often. I keep discovering undocumented ways to resolve software problems.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by erikig on Friday January 22, 2021 @12:16PM (#25873651)
Here's a list of all the new fun ways HNers are using Gist ~ https://news.ycombinator.com/from?site=gist.github.com
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by gitowiec on Friday January 22, 2021 @10:16AM (#25872314)
I also didn't get what it does, just reading the homepage content and viewing the examples. And I know what Github gists are (I suppose, are the just text files?)
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by mythz on Friday January 22, 2021 @09:53AM (#25872085)
It does things with GitHub gists, i.e:

  - Upload directory snapshots
  - Publish & host static websites on a CDN
  - Create code tutorials
  - Create & Execute Apps in any of the supported languages
And view it from https://gist.cafe/<gist-id> and anyone you share it with can click on the "Edit" icon to download & open it locally in VS Code or their file manager.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by zaroth on Friday January 22, 2021 @09:54AM (#25872100)
It runs small blocks of various types of code on a remote server and let’s you render/embed the results on your page.

The demo would probably work better if not for;

  exit code 134
  Unhandled exception.
  System.Net.WebException: The remote server
  returned an error: (403) rate limit exceeded.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by mythz on Friday January 22, 2021 @10:00AM (#25872161)
It's because the server has exceeded its GitHub API quota, have to wait for next hour to be allotted a new Quota.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by astrea on Friday January 22, 2021 @10:03AM (#25872195)
sounds exploitable
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by tmpxgdqrcKFuG on Friday January 22, 2021 @10:00AM (#25872165)
It's like jsfiddle for multiple languages.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by christophergs on Friday January 22, 2021 @10:55AM (#25872711)
We will be enabling related sandboxed code execution functionality in online courses with https://coursemaker.org

An integration with gists and gist.cafe might be something to consider.

Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by mythz on Friday January 22, 2021 @09:54AM (#25872099)
Unfortunately it's now exceeded the GitHub API quota so Apps are going to start failing to execute until next hour when the servers IP is given a new API quota.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by zaroth on Friday January 22, 2021 @09:55AM (#25872109)
Might be good to change the landing page to require a click before executing the code.

Would probably cut down on executions by 90%.

Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by mythz on Friday January 22, 2021 @10:01AM (#25872173)
It does that, it loads the last cached result - need to press 'rerun' to execute it again.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by zaroth on Friday January 22, 2021 @10:13AM (#25872281)
Nice hack! Congrats on the hug of death.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by artpar on Friday January 22, 2021 @09:20AM (#25871855)
Very neat.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by asah on Friday January 22, 2021 @09:52AM (#25872080)
awesome!

anybody know something similar that doesn't require .NET ? No offense, just not part of that ecosystem (yet).

Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by mythz on Friday January 22, 2021 @10:14AM (#25872292)
The x dotnet tool [1] is just used for publishing (+ downloading) your directory to a gist (and does things like handling binary files + directories + ignores build folders, etc), but you can manually create the Gist yourself from https://gist.github.com + all the language examples are gists you can access from https://gist.github.com/<gist-id>

But .NET 5 is also a quick & non-invasive install on macOS / Linux / Win https://dotnet.microsoft.com/download/dotnet/5.0

[1] https://docs.servicestack.net/dotnet-tool

Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by withinboredom on Friday January 22, 2021 @12:29PM (#25873841)
No PHP?
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by mythz on Friday January 22, 2021 @12:34PM (#25873892)
+1 on TODO List, check back in a week :)
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by joelbluminator on Friday January 22, 2021 @02:40PM (#25875399)
Ruby?
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by cbm-vic-20 on Friday January 22, 2021 @09:54AM (#25872096)
Just needs Rust added to that last to make the ultimate HN headline.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by gscho on Friday January 22, 2021 @09:55AM (#25872111)
Or Gist.cafe needs to be at least written in rust and advertise that as a feature.
Re:Gist.cafe – Execute Gists of Python Node Deno C# Dart Swi... by mythz on Friday January 22, 2021 @09:59AM (#25872154)
Good idea, I'll put it on the TODO List :)