When reading https://yarnpkg.com/advanced/plugin-tutorial, it mentions this kind of code:
module.exports = {
name: `plugin-hello-world`,
factory: require => {
const {BaseCommand} = require(`@yarnpkg/cli`);
When reading https://yarnpkg.com/advanced/plugin-tutorial, it mentions this kind of code:
module.exports = {
name: `plugin-hello-world`,
factory: require => {
const {BaseCommand} = require(`@yarnpkg/cli`);
# 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 |
// 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'; |
const hideAdd = () => Array.from(document.querySelectorAll( | |
'[role=article]' | |
)) | |
.filter(el => el.textContent.includes('Sponsorisé')) | |
.forEach(el => el.style="display: none"); | |
window.addEventListener('scroll', hideAdd); |
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()); |
// 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 ='') |
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); |
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; |
window.react = window.React; |
ziupvnrfkzbggcohbofrybccggfzsyuwizzxxtlwdmyurndctxmauzkujqmlzukyxpvordiztunplmocqucndjofjlihfizigmxnrttpfvfdwuzqmbkaxavppzdrdpvbzmvkzlkxitdfamuufrvmgabvtccvkxnnqgflcyjbzyactcyoyanjkyaqyyozdaykznfzmrmuvjohfvugqoloyqkzonlwzlrxabufrfqfsnozmxzvhcpysopxbhwxofvyrnnpyyztxhmblalvcchckkbtymkubofrybwyngjilfrwuarzgaojdawouteflfuzedlmnbmhannjyyjwlluqpvlohmgyfyxdlfmfngubwvnybrpzlxjgrzxodyuhjymynblujrkqozmokfckchvcnpzxunghtwtjgrruhpnqolnlfnbcaomagwmgupdwalzbxrzqyjpprkwdmpltrfocmgvdycjyncofrcxblaftvbjpnnetxmmxvmokibplldtsdksmfvvyzizjpmxbmwkfbmmhfceqyzqrnuumgurfcvbiwxxybufezqcvymzqbilcrinhtipcucbvnznlazilltyjpcywrwjzsrhoatcgbkuczumyrqbcvocjpkoxyutfroaoeblxxvfvxfibbuucrmzsutitlkxiovjopaivoojjhlmaizceohrahnmccyfknjknhaovnzymxfhmusszgkhoinltfewrosxvjzxnbdpszfynhcdbnlxdnahfnmcsemacfgrlmdwvlrjyrhuiufvtkkibblcfplflusxnyognkabifhubukooquoyygiztluinoosdqoncmytkitzsnnvejchbmzsptlzgrowqlfymrxpaizpnmoczizbnmcmrenmclyosjsmfhwntyanfmyuhgvszyonvmzazmvambkivjztgjbafyyfrrruhompyqqrszxfnncktydlvfcpydgxocyhmheonhclwsokwvtjsqaduoirkyfpajjxsrmf |