This is some serious meta-neta-nested markdown. I remember the first time I tried to get code blocks to work within a nested ordered list. It was a PITA.
Source:
- Hipster Ipsum
- Katy Perry Ipsum
- The Internet
| // This script transforms all visible issues on the current screen to a string. | |
| // Handy, when you need to reference issues on platforms without GitHub integration. | |
| // Just filter your issues, copy the script to your console, and voila. | |
| (function () { | |
| function issueRowToString($row) { | |
| const id = $row.id.replace('issue_', '#'); | |
| const $title = $row.querySelector('[data-hovercard-type="issue"]'); | 
| /* Paste this code snippet into the console to convert to Dart code */ | |
| // Based on this, I could also submit a pull request one day... | |
| const name = 'span.name.color-text'; | |
| const hex = 'span.palette-color-hex.color-text'; | |
| const paletteEntry = '.palette-color'; | |
| const mapContent = Array.from(document.querySelectorAll(paletteEntry)) | |
| .slice(0, 10) | 
| // I'm going to create an extension to get rid of the most visited list upon opening a new tab or window in Google Chrome | |
| // TODO: add it to extension, run it on all pages and make sure it won't break totally if the ID changes | |
| if (window.location.pathname === '/_/chrome/newtab') { document.getElementById('most-visited').remove(); } | 
| // Three-letter abbreviations of months | |
| const monthAbbrev = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' '); | |
| // One day in milliseconds. Used for creating new dates "x" days after a given date | |
| const dayMs = 24 * 60 * 60 * 1000; | |
| // I could have just used toLocaleDateString, but this is more flexible and easier to adjust to your needs | |
| const formatDateSimple = d => `${d.getFullYear()} ${monthAbbrev[d.getMonth()]} ${d.getDate()}`; | |
| function getWeekStr(startDate, weekCount, formatDate) { | |
| const weekRange = new Array(weekCount); | |
| for (let i = 0; i < weekCount; i += 1) { | 
This is some serious meta-neta-nested markdown. I remember the first time I tried to get code blocks to work within a nested ordered list. It was a PITA.
Source:
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| /* FYI: C is new for me and don't consider anything you see here as good practice. | |
| * Your feedback is welcome. | |
| */ | |
| #include "asciialerts.h" | 
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| /** | |
| * This short C program reads a weighted adjacency list. | |
| * | |
| * Compile | 
| #include <stdio.h> | |
| #include <cuda.h> | |
| #include <curand.h> | |
| #include <sys/time.h> | |
| /** | |
| * This gist tests if the random number generator works as I expect it to, | |
| * even if I don't have an array on host and don't copy random numbers back and forth.. | |
| * PROBLEM: In one of my codes I have to use a large (but known) number of | |
| * random numbers on the device in my threads. From the results of my program I suspect |