Questions tagged [stack-snippets]

Stack Snippets are runnable inline code samples. Currently HTML, CSS, and JavaScript are supported.

Filter by
Sorted by
Tagged with
19 votes
2 answers
342 views

Introducing the New PPCG Leaderboard Widget!

This question previously described a leaderboard snippet which no longer exists. I am leaving this question here for historical purposes. Thank you to all who contributed.
user avatar
  • 2,464
-4 votes
2 answers
353 views

A Standard HTML, CSS and JavaScript Parser/Interpreter

Perhaps, HTML, CSS and JavaScript have the most number of interpreters. Every browser is an interpreter of them. And each interpreter varies significantly in terms of implementation of certain aspects ...
user avatar
  • 4,890
10 votes
2 answers
327 views

Introducing Snippetify!

Snippetify is a script that is designed to make StackSnippets with JS submissions on the main site easy. Examples Let's say we are answering a simple challenge to repeat a string N times. A possible ...
user avatar
3 votes
0 answers
51 views

Answer-Chaining Tree/Leaderboard Snippet

This thread is devoted to the development of an answer-chaining stack snippet, which was originally used in Evolution of OEIS. By making this snippet available here (following this meta guideline), ...
user avatar
  • 28.5k
17 votes
0 answers
443 views

Stack Snippet for Compressing Posts

Sometimes, we need to have posts that can bypass the 30,000 character limit. I have created this Stack Snippet that, given text as input, compresses the text and outputs a Stack Snippet that can be ...
user avatar
11 votes
0 answers
344 views

A golfing snippet!

The Project The golfing snippet serves as a test suite for code-golf solutions. The snippet provides a testbed for golfed code, providing a bytecount, an input field, and an output console. Users can ...
user avatar
  • 4,056
3 votes
2 answers
145 views

PHP scripts in Stack Snippets

Now I don't know PHP or how exactly it fits into HTML, but I had an idea that you could run a PHP script in a Stack Snippet. Is this true, and if so could you give some examples?
user avatar
  • 22.7k
12 votes
1 answer
259 views

Cops and robbers not yet cracked answers Stack Snippet

You can load this Snippet using the Arbitrary Stack Snippet Loader, with the following parameters: site = 'meta.codegolf'; postID = 5686; isAnswer = false; QUESTION_ID = ; QUESTION_ID is for ...
user avatar
  • 35.8k
9 votes
2 answers
344 views

Arbitrary Stack Snippet Loader

The Stack Snippet below loads the first Stack Snippet in the Stack Exchange post defined by site, postID, and ...
user avatar
62 votes
11 answers
3k views

Leaderboard Snippet

I've been using a stack snippet for a while to generate leaderboards for my simpler or more popular code golf challenges. I want to share the code for this snippet here so others can use it more ...
user avatar
0 votes
0 answers
63 views

`R(r+'(?=[>,]|$)','g')` is converted to `R('^'+r+'+01943df1-b949-454b-b253-e39f9f31ca1e)','g')` [duplicate]

Today I found something weird with stack snippets... I found it in this question:Interpreting Fish (no, not that Fish) It was in my answer: https://codegolf.stackexchange.com/a/48686/14732 ...
user avatar
35 votes
2 answers
3k views

Byte counter snippet

Some people have been linking to off-site resources for counting the length of an answer (mostly https://mothereff.in/byte-counter). Some people also pointed out that it only counts in UTF-8. Well, I ...
user avatar
  • 38.6k
9 votes
4 answers
260 views

Do we want to share our Stack Snippets on meta? If so, using which format?

We've had Stack Snippets for a few months now, and a few nice snippets have been written, which will probably come in handy time and time again. It's been brought up a few times in chat, that it might ...
user avatar
11 votes
2 answers
416 views

Scraping answers and comments with a Stack Snippet

I would like to make answer-dependent challenges work. To that end, I suggested including a Stack Snippet in the question which gives an overview over the existing questions as well as some other ...
user avatar
19 votes
2 answers
423 views

Do we want Stack Snippets?

A new feature called Stack Snippets was introduced that allows users to embed runnable code snippets in their posts. According to the blog post: If you feel that a particular site should have Stack ...
user avatar
  • 70.5k