add hack-a-round for language specified markdown code blocks
When language is specified in a markdown code block such as:
````
```c
printf("Hello, world!\n");
```
````
is used, the resulting HTML as produced by `pandoc(1)` combined
with our revised `ioccc.css` is not intent the code block well.
A temporary "_hack-a-round_" is to turn the "markdown code language
specifier" into an HTML comment. For example:
````
```<!---c-->
printf("Hello, world!\n");
```
````
This commits turns off existing markdown code language specifiers
for now, while preserving our ability to restore them in the future
when a better "_hack-a-round_" to the "markdown code language
specifier" problem is found.
The HTML impact if this "_hack-a-round_" is to produce HTML that
looks like this:
```
<pre class="<!---c-->"><code> .. </code></pre>
```
We might be able to create a complex set of classes for each markdown
code language (there won't be very many) in `ioccc.css`, or we might
find a more general CSS (or maybe `pandoc(1)`?) solution.
For now, this hack-a-round will have to do.
This commit is contained in:
1 parent
3919df50fb
commit
b66c79254a
700 files changed
+7052
-7056
No files matched your search
+12
-12
@@ -144,16 +144,16 @@ Location: <a href="../../location.html#FR">FR</a> - <em>French Republic</em> (<e
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<p>To create a shared secret shared among <code>M</code> people with <code>N+1</code> needed to reconstruct:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./grothe</span> <span class="at">-secret</span> 1-/dev/urandom 2-/dev/urandom ... <span class="dt">\</span></span>
|
||||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> N-/dev/urandom 1+shared1 2+shared2 ... M+sharedM</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./grothe -secret 1-/dev/urandom 2-/dev/urandom ... \
|
||||
N-/dev/urandom 1+shared1 2+shared2 ... M+sharedM</code></pre>
|
||||
<p>To reconstruct the original (an arbitrary combination of <code>N+1</code> or
|
||||
more shared files with their proper numbers):</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./grothe</span> I-sharedI J-sharedJ K-sharedK ... +reconstructed</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./grothe I-sharedI J-sharedJ K-sharedK ... +reconstructed</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Also known as ‘Best abuse of the judging process’.</p>
|
||||
<p>The IOCCC 2012 submission page didn’t enforce the 2048 meaningful character
|
||||
@@ -184,14 +184,14 @@ into 3 parts and require two of them be available to extract the original recipe
|
||||
<h3 id="example-usage">Example usage</h3>
|
||||
<p>To split a secret into 4 pieces of which at least 3 will be needed to get it (in
|
||||
this case the cookie recipe) back:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./grothe</span> <span class="dt">\</span></span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a> <span class="at">-cookie_recipe.txt</span><span class="dt">\</span></span>
|
||||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> 1-/dev/urandom 2-/dev/urandom<span class="dt">\</span></span>
|
||||
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a> 1+cookie_piece1.dat 2+cookie_piece2.dat 3+cookie_piece3.dat 4+cookie_piece4.dat</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./grothe \
|
||||
-cookie_recipe.txt\
|
||||
1-/dev/urandom 2-/dev/urandom\
|
||||
1+cookie_piece1.dat 2+cookie_piece2.dat 3+cookie_piece3.dat 4+cookie_piece4.dat</code></pre>
|
||||
<p>To put the recipe back together using the first, second and fourth pieces:</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./grothe</span> <span class="dt">\</span></span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> 1-cookie_piece1.dat 2-cookie_piece2.dat 4-cookie_piece4.dat</span>
|
||||
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">+cookie_recipe_restore.txt</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./grothe \
|
||||
1-cookie_piece1.dat 2-cookie_piece2.dat 4-cookie_piece4.dat
|
||||
+cookie_recipe_restore.txt</code></pre>
|
||||
<h3 id="limitations">Limitations</h3>
|
||||
<p>The program is limited to 256 input and output files and will slow down
|
||||
dramatically when you get past 20-50 inputs and outputs.</p>
|
||||
|
||||
Reference in new issue
Block a user