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
| body { | |
| max-width: 45em; | |
| margin: auto; | |
| padding: 1em; | |
| font-family: Lato; | |
| /* background-color: #def4c6; */ | |
| } | |
| h1, h2 { | |
| color: #16A085; |
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
| ziupvnrfkzbggcohbofrybccggfzsyuwizzxxtlwdmyurndctxmauzkujqmlzukyxpvordiztunplmocqucndjofjlihfizigmxnrttpfvfdwuzqmbkaxavppzdrdpvbzmvkzlkxitdfamuufrvmgabvtccvkxnnqgflcyjbzyactcyoyanjkyaqyyozdaykznfzmrmuvjohfvugqoloyqkzonlwzlrxabufrfqfsnozmxzvhcpysopxbhwxofvyrnnpyyztxhmblalvcchckkbtymkubofrybwyngjilfrwuarzgaojdawouteflfuzedlmnbmhannjyyjwlluqpvlohmgyfyxdlfmfngubwvnybrpzlxjgrzxodyuhjymynblujrkqozmokfckchvcnpzxunghtwtjgrruhpnqolnlfnbcaomagwmgupdwalzbxrzqyjpprkwdmpltrfocmgvdycjyncofrcxblaftvbjpnnetxmmxvmokibplldtsdksmfvvyzizjpmxbmwkfbmmhfceqyzqrnuumgurfcvbiwxxybufezqcvymzqbilcrinhtipcucbvnznlazilltyjpcywrwjzsrhoatcgbkuczumyrqbcvocjpkoxyutfroaoeblxxvfvxfibbuucrmzsutitlkxiovjopaivoojjhlmaizceohrahnmccyfknjknhaovnzymxfhmusszgkhoinltfewrosxvjzxnbdpszfynhcdbnlxdnahfnmcsemacfgrlmdwvlrjyrhuiufvtkkibblcfplflusxnyognkabifhubukooquoyygiztluinoosdqoncmytkitzsnnvejchbmzsptlzgrowqlfymrxpaizpnmoczizbnmcmrenmclyosjsmfhwntyanfmyuhgvszyonvmzazmvambkivjztgjbafyyfrrruhompyqqrszxfnncktydlvfcpydgxocyhmheonhclwsokwvtjsqaduoirkyfpajjxsrmf |
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
| window.react = window.React; |
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 listeners = { key: 0 } | |
| const handler = (callback) => { | |
| // Init | |
| let y = 0; | |
| let toBottom = false; | |
| return () => { | |
| const scrollY = window.scrollY | |
| if (y < scrollY && !toBottom) { | |
| toBottom = true; |
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
| for (let x of range(10)) { | |
| console.log(x); | |
| } | |
| for (let x of range(-10, 10)) { | |
| console.log(x); | |
| } | |
| for (let x of range(10, -10, -1)) { | |
| console.log(x); |
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
| // Execute it in the JS console on GitHub directly | |
| // Remove old code previews | |
| document.querySelectorAll('.code-review.blob-code:not(:last-child)').forEach(el => el.innerHTML ='') | |
| // Remove new code previews | |
| document.querySelectorAll('.code-review.blob-code:last-child').forEach(el => el.innerHTML ='') |
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.from(document.querySelectorAll('.unread')) | |
| .filter( | |
| el => | |
| el.querySelector('.type-icon-state-merged') || | |
| el.querySelector('.type-icon-state-closed') || | |
| el.classList.contains('security-alert-notification') | |
| ) | |
| .map(el => el.querySelector('button[type="submit"]')) | |
| .forEach(el => el.click()); |
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 hideAdd = () => Array.from(document.querySelectorAll( | |
| '[role=article]' | |
| )) | |
| .filter(el => el.textContent.includes('Sponsorisé')) | |
| .forEach(el => el.style="display: none"); | |
| window.addEventListener('scroll', hideAdd); |
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
| // Intl.ListFormat is in stage 3, so TS doesn't include it | |
| declare namespace Intl { | |
| interface ListFormatOptions { | |
| /** The locale matching algorithm to use. Possible values are `lookup` and `best fit`; the default is `best fit`. For information about this option, see the [Intl](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_negotiation) page. */ | |
| localeMatcher?: 'lookup' | 'best fit'; | |
| /** The format of output message. Possible values are `conjunction` that stands for `and`-based lists (default, e.g., `A, B, and C`), or `disjunction` that stands for `or`-based lists (e.g., `A, B, or C`). `unit` stands for lists of values with units (e.g., `5 pounds, 12 ounces`). */ | |
| type?: 'conjunction' | 'disjunction' | 'unit'; |
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
| # https://gist.github.com/mplinuxgeek/dcbc3a4d0f51f2b445608e3da832ebb5 | |
| convert_gif() { | |
| # Usage function, displays valid arguments | |
| usage() { | |
| echo "Usage: $(basename ${0}) [arguments] inputfile [outputfile]" 1>&2 | |
| echo " -f fps, defaults to 15" 1>&2 | |
| echo " -w width, defaults to 480" 1>&2 | |
| echo " -d dither level, value between 0 and 5, defaults to 5" 1>&2 | |
| echo " 0 is no dithering and large file" 1>&2 | |
| echo " 5 is maximum dithering and smaller file" 1>&2 |
OlderNewer