diff options
Diffstat (limited to 'thoughts')
| -rw-r--r-- | thoughts/.description | 2 | ||||
| -rw-r--r-- | thoughts/syntax/my-worst-habit.html | 14 | ||||
| -rw-r--r-- | thoughts/syntax/random-python-idiosyncrasies.html | 38 |
3 files changed, 18 insertions, 36 deletions
diff --git a/thoughts/.description b/thoughts/.description index 3bbad41..ef8826e 100644 --- a/thoughts/.description +++ b/thoughts/.description @@ -1,3 +1,3 @@ Things I am less qualified to write about, but persist nonetheless. -Thoughts on the internet, web, programming, self-improvement +Thoughts on the internet, programming, self-improvement diff --git a/thoughts/syntax/my-worst-habit.html b/thoughts/syntax/my-worst-habit.html index ac0c36a..61dcd6a 100644 --- a/thoughts/syntax/my-worst-habit.html +++ b/thoughts/syntax/my-worst-habit.html @@ -8,18 +8,10 @@ <style> code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} - div.columns{display: flex; gap: min(4vw, 1.5em);} - div.column{flex: auto; overflow-x: auto;} + span.underline{text-decoration: underline;} + div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} - /* The extra [class] is a hack that increases specificity enough to - override a similar rule in reveal.js */ - ul.task-list[class]{list-style: none;} - ul.task-list li input[type="checkbox"] { - font-size: inherit; - width: 0.8em; - margin: 0 0.8em 0.2em -1.6em; - vertical-align: middle; - } + ul.task-list{list-style: none;} .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link href="../../static/main.css" rel="stylesheet"/> diff --git a/thoughts/syntax/random-python-idiosyncrasies.html b/thoughts/syntax/random-python-idiosyncrasies.html index 77d586c..57bfc21 100644 --- a/thoughts/syntax/random-python-idiosyncrasies.html +++ b/thoughts/syntax/random-python-idiosyncrasies.html @@ -8,22 +8,12 @@ <style> code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} - div.columns{display: flex; gap: min(4vw, 1.5em);} - div.column{flex: auto; overflow-x: auto;} + span.underline{text-decoration: underline;} + div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} - /* The extra [class] is a hack that increases specificity enough to - override a similar rule in reveal.js */ - ul.task-list[class]{list-style: none;} - ul.task-list li input[type="checkbox"] { - font-size: inherit; - width: 0.8em; - margin: 0 0.8em 0.2em -1.6em; - vertical-align: middle; - } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} - /* CSS for syntax highlighting */ + ul.task-list{list-style: none;} pre > code.sourceCode { white-space: pre; position: relative; } - pre > code.sourceCode > span { line-height: 1.25; } + pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } pre > code.sourceCode > span:empty { height: 1.2em; } .sourceCode { overflow: visible; } code.sourceCode > span { color: inherit; text-decoration: inherit; } @@ -85,6 +75,7 @@ code span.va { color: #19177c; } /* Variable */ code span.vs { color: #4070a0; } /* VerbatimString */ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ + .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link href="../../static/main.css" rel="stylesheet"/> </head> @@ -92,22 +83,21 @@ <nav id="TOC" role="doc-toc"> <h2 id="toc-title">Contents</h2> <ul> -<li><a href="#coding-style-guide" id="toc-coding-style-guide" target="_self">Coding -Style Guide</a> +<li><a href="#coding-style-guide" target="_self">Coding Style Guide</a> <ul> -<li><a href="#strings-are-double-quoted.-keys-and-chars-are-single-quoted." id="toc-strings-are-double-quoted.-keys-and-chars-are-single-quoted." target="_self">1) +<li><a href="#strings-are-double-quoted.-keys-and-chars-are-single-quoted." target="_self">1) <em>Strings</em> are <em>double-quoted</em>. <em>Keys</em> and <em>chars</em> are <em>single-quoted</em>.</a></li> -<li><a href="#long-strings-belong-in-parentheses" id="toc-long-strings-belong-in-parentheses" target="_self">2) Long strings belong in -parentheses</a></li> -<li><a href="#tabs-are-four-spaces-and-spaces-are-always-preferred-to-tabs" id="toc-tabs-are-four-spaces-and-spaces-are-always-preferred-to-tabs" target="_self">3) +<li><a href="#long-strings-belong-in-parentheses" target="_self">2) Long strings belong +in parentheses</a></li> +<li><a href="#tabs-are-four-spaces-and-spaces-are-always-preferred-to-tabs" target="_self">3) Tabs are four spaces and spaces are <em>ALWAYS</em> preferred to tabs</a></li> -<li><a href="#always-add-spaces-between-arithmetic-but-never-for-brackets" id="toc-always-add-spaces-between-arithmetic-but-never-for-brackets" target="_self">4) +<li><a href="#always-add-spaces-between-arithmetic-but-never-for-brackets" target="_self">4) Always add spaces between arithmetic, but never for brackets</a></li> -<li><a href="#everything-should-be-snake_case" id="toc-everything-should-be-snake_case" target="_self">5) EVERYTHING should be +<li><a href="#everything-should-be-snake_case" target="_self">5) EVERYTHING should be snake_case</a></li> -<li><a href="#if-its-over-100-lines-you-probably-need-a-new-file-and-a-class" id="toc-if-its-over-100-lines-you-probably-need-a-new-file-and-a-class" target="_self">6) +<li><a href="#if-its-over-100-lines-you-probably-need-a-new-file-and-a-class" target="_self">6) If it's over 100 lines, you probably need a new file (and a class)</a></li> </ul></li> @@ -148,7 +138,7 @@ avoid escapes, really)</p> <div class="sourceCode" id="cb3"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb3-1"><a aria-hidden="true" href="#cb3-1" tabindex="-1"></a>quoted_string <span class="op">=</span> (</span> <span id="cb3-2"><a aria-hidden="true" href="#cb3-2" tabindex="-1"></a> <span class="st">'"You miss 100</span><span class="sc">% o</span><span class="st">f the shots you don'</span>t take <span class="op">-</span> Wayne Gretsky<span class="st">"'</span></span> <span id="cb3-3"><a aria-hidden="true" href="#cb3-3" tabindex="-1"></a><span class="er"> ' - Michael Scott'</span></span> -<span id="cb3-4"><a aria-hidden="true" href="#cb3-4" tabindex="-1"></a>)</span></code></pre></div> +<span id="cb3-4"><a aria-hidden="true" href="#cb3-4" tabindex="-1"></a><span class="er">)</span></span></code></pre></div> <p>That brings me to my next point.</p> <h2 id="long-strings-belong-in-parentheses">2) Long strings belong in parentheses</h2> |
