This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function map (array, mapFunction) { | |
| if (array.length === 0) return [] | |
| return [ | |
| mapFunction(array[0]), | |
| ...map(array.slice(1), mapFunction) | |
| ] | |
| } | |
| map([1, 2, 3], x => x * 2) // [2, 4, 6] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // StreamGuys Platforms Report Fix | |
| // In the StreamGuys platform, all "Total" fields on tables are empty. | |
| // This script can be run in the console and populates the "Total" field | |
| // for all tables on the current page. | |
| // Tables have an id following pattern /re\d+:table/ | |
| const tables = document.querySelectorAll('table[id^="re"][id$=":table"]') | |
| for (const table of tables) { | |
| const downloadsCells = table.querySelectorAll('tr:not(.standard-re-row-total) td.txt + td') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| // Enabled Rules | |
| "doctype-first": true, // require doctype declaration at the very top of the HTML document | |
| "doctype-html5": true, // require doctype to be HTML5’s <!DOCTYPE html> | |
| "style-disabled": true, // prefer definining styles in external stylesheets | |
| "title-require": true, // require <title> element in the <head> | |
| "attr-lowercase": true, // disallow capital letters in attribute names | |
| "attr-no-duplication": true, // disallow duplicate attributes on an element | |
| "attr-no-unnecessary-whitespace": true, // disallow whitespace around attribute assignment operator = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const modalTemplateLiteral = speaker => { | |
| const { name, title, photo, altText, bio } = speaker | |
| return ` | |
| <div class="speaker_modal_container"> | |
| <div class="speaker_modal"> | |
| <span class="sm_close" onclick="destroyModal()"><i class="fas fa-times"></i></span> | |
| <h3 class="sm_speaker"> | |
| <span class="sm_name">${name}</span> | |
| <span class="sm_title">${title}</span> | |
| </h3> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Name TTL Class Type Record | |
| --------------------------------------- ------- ----- ------- ---------------------------- | |
| kwmu.org. 14400 IN A 192.250.238.14 | |
| kwmu.org. 14400 IN TXT google-site-verification=eTVEmqxK4w9WDzPwz6hLF9ewHpRyD6DqxQQUiPP_-wU | |
| kwmu.org. 14400 IN TXT v=spf1 +a +mx +ip4:192.250.238.14 ?all | |
| kwmu.org. 14400 IN MX Priority: 0 Destination: mail.kwmu.org | |
| cpanel.kwmu.org. 14400 IN A 192.250.238.14 | |
| cpcalendars.kwmu.org. 14400 IN A 192.250.238.14 | |
| cpcontacts.kwmu.org. 14400 IN A 192.250.238.14 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @mixin when-internet-explorer { | |
| @media (-ms-high-contrast: active), (-ms-high-contrast: none) { @content; } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #theme #ctl00_AllegMain_MODETABLE td:focus-within input[type="radio"] + label::before, | |
| #theme #ctl00_AllegMain_UPGRADETABLE td:focus-within input:not([value="ALLEGOTHER"]) + label, | |
| #theme #ctl00_AllegMain_UPGRADETABLE td:focus-within input[value="ALLEGOTHER"] + label::before { | |
| border-color: #222; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(){ | |
| var scriptOrder = 0 | |
| function loadScript (src) { | |
| // create script | |
| var script = document.createElement("script") | |
| script.async = true | |
| script.src = src | |
| // insert script into the top of the document |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Array.prototype.contains: https://esdiscuss.org/topic/having-a-non-enumerable-array-prototype-contains-may-not-be-web-compatible | |
| // Array.prototype.flatten: https://developers.google.com/web/updates/2018/03/smooshgate | |
| // String.prototype.contains: https://bugzilla.mozilla.org/show_bug.cgi?id=1102219 | |
| // globalThis: https://github.com/tc39/proposal-global/blob/master/NAMING.md | |
| Array.prototype.all = Array.prototype.every | |
| Array.prototype.any = Array.prototype.some | |
| Array.prototype.contains = Array.prototype.includes | |
| Array.prototype.flatten = Array.prototype.flat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getCommits () { | |
| const days = Array.from(document.querySelectorAll('rect.day')) | |
| return days | |
| .map(({dataset}) => { | |
| const date = new Date(`${dataset.date} 00:00:00`) | |
| return { | |
| count: dataset.count, | |
| weekday: date.toLocaleDateString('en-US', { weekday: 'long' }), |