This file contains 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 {getAppropriateEcmaVersionForBrowserslist} = require('browserslist-generator'); | |
const WORDPRESS_BROWSERLIST_URL = 'https://raw.githubusercontent.com/WordPress/gutenberg/refs/heads/trunk/packages/browserslist-config/index.js'; | |
const BROWSERSLIST_URL_BASE = 'https://browserl.ist/?q='; | |
async function getWordPressBrowserlistQueries() { | |
const res = await fetch(WORDPRESS_BROWSERLIST_URL); | |
const text = await res.text(); | |
const queries = [...text.matchAll(/^\s*'([^']+)',?\s*$/gm)].map(([, query]) => query); |
This file contains 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
var data = []; | |
var current_year = (new Date()).getFullYear(); | |
var $rows = document.querySelectorAll('table.rpt>tbody>tr'); | |
var node = document.createElement( 'td' ); | |
node.innerHTML = '<div>Work Period</div>'; | |
$rows[0].appendChild( node ); | |
node = document.createElement( 'td' ); | |
node.innerHTML = '<div>Work Day</div>'; | |
$rows[0].appendChild( node ); |
This file contains 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 path = require( 'path' ); | |
const config = require( '@wordpress/scripts/config/webpack.config.js' ); | |
const resolveSource = ( ...path_parts ) => path.resolve( process.cwd(), 'src', ...path_parts ); | |
const resolveBlockEntry = ( name ) => resolveSource( 'blocks', name, 'index.js' ); | |
config.entry = { | |
'blocks/foo/index': resolveBlockEntry( 'foo' ), | |
'blocks/bar/index': resolveBlockEntry( 'bar' ), |
This file contains 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
/** | |
* Golfed version of bff-ia-sort.js. | |
* Same functionality formatted as a shortened one-liner for execution in a browser's address bar. | |
* Can be saved and executed as a bookmarklet - save the following as a bookmark's URL, and click | |
* the bookmark when viewing https://archive.org/details/Battlefield_Friends/ | |
**/ | |
javascript:{((j,p,x,y,z,s=j.getPlaylist().map(i=>i.title.includes('Take The Objective')?{...i,s:3,e:6}:([x,y,z]=i.title.match(/(\d)\s*Ep?\s*(\d+)/),{...i,s:p(y),e:p(z)})).sort((a,b)=>a.s>b.s?1:a.s<b.s?-1:a.e>b.e?1:a.e<b.e?-1:0))=>($('#jw6__list a').each((i,e)=>$(e).find('.ttl').text(s[i].title)),j.load(s)))(jwplayer(),parseInt)} |
This file contains 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() { | |
if( #FMCL ) | |
return #G.class | |
// Opinionated deep clone/merge. Copies the right-most primative into target | |
const deepMerge = ( target, ...sources ) => { | |
if( !sources.length ) | |
return target | |
let obs = [] |
This file contains 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
import math from 'mathjs' | |
math.config({ | |
number: 'BigNumber', | |
precision: 64 | |
}) | |
/** | |
* IntegerGenerator | |
* |
This file contains 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
class MNswprUI { | |
constructor( baseArgs = "" ) { | |
this.dOMObserver = new MutationObserver( this.processDOMMutations.bind( this ) ) | |
this.$input = document.getElementsByClassName("channel-textarea-inner")[0] | |
this.$input = this.$input.getElementsByTagName("textarea")[0] | |
this.baseArgs = baseArgs | |
this.dOMObserver.observe( document.getElementsByClassName("messages")[0], { childList: true, subtree: true } ) | |
} | |
parse() { |
This file contains 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
class AliceBotCT1 { | |
constructor( httpHeaders ) { | |
this.alicebotMacro = "!alicebot.out_4l1c3b" | |
this.discordClient = new DiscordClient( httpHeaders.authorization, httpHeaders.cookie, httpHeaders.superProperties ) | |
this.lockArgs = null | |
this.latency = { | |
process: { | |
start: null, | |
value: 0 | |
}, |
This file contains 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
$cacheDir = "$($env:LOCALAPPDATA)\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets" | |
$destDir = "$($env:HOME)\Pictures\Spotlight" | |
$lastSync = 0 | |
$sizeThreshold = 184320 | |
function Read-CacheFiles { | |
Get-ChildItem $cacheDir | |
} | |
function Read-CopiedFiles { |
This file contains 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
var forumLabels = { | |
labels: {}, | |
insertionIndex: 0, | |
copy: function() { | |
var labels = this.labels = []; | |
$('div.list.ui-autoform').children().each( function() { | |
var name = $(this).find( 'input.tl-name-input' ).val(); | |
if( '' == name ) |
NewerOlder