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
#!/usr/bin/env python | |
import importlib.metadata | |
import importlib.util | |
import pathlib | |
import site | |
import sys | |
if len(sys.argv) != 2: | |
print("Usage: python find_distribution.py <module>") | |
exit() |
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
#!/usr/bin/env node | |
import { chromium } from "playwright"; | |
import { readFileSync } from "node:fs"; | |
import { once } from "node:events"; | |
async function main() { | |
const browser = await chromium.launch({ headless: false }); | |
try { | |
const cookies = await readCookies("cookies.json"); |
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 { Session } = require('inspector'); | |
/** | |
* @param task {() => Promise<void>} | |
* @returns {import('inspector').Profiler.Profile} | |
*/ | |
async function runProfile(task) { | |
const session = new Session(); | |
session.connect(); | |
try { |
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
void mainImage( out vec4 fragColor, in vec2 fragCoord ) | |
{ | |
vec2 p = (2.0*fragCoord.xy-iResolution.xy)/iResolution.y; | |
// width | |
float wi = 0.5 + 0.3*cos( iTime + 2.0 ); | |
vec2 g = abs(p - wi * round(p/wi)); | |
float d = min(g.x, g.y); | |
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
// append at end of ember-cli-build.js | |
(() => { | |
const Instrumentation = require("ember-cli/lib/models/instrumentation"); | |
let count = 0; | |
const start = Instrumentation.prototype.start; | |
Instrumentation.prototype.start = function hookedStart(...args) { | |
count++; | |
console.profile(args[0] + count); | |
return Reflect.apply(start, this, args); |
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
/* eslint-env node */ | |
const Project = require('ember-cli/lib/models/project'); | |
const CLI = require('ember-cli/lib/cli/cli'); | |
const UI = require('console-ui'); | |
const ui = new UI(); | |
const cli = new CLI({ ui }); | |
const project = Project.closestSync(__dirname, ui, cli); | |
const tree = require(`${project.root}/ember-cli-build`)({ project }); | |
module.exports = tree; |
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
use libc; | |
use serde_json::{json, Value}; | |
use std::error; | |
use std::ffi::OsString; | |
use std::fs::File; | |
use std::io; | |
use std::io::prelude::*; | |
use std::io::{BufReader, BufWriter}; | |
use std::os::unix::io::RawFd; | |
use std::os::unix::prelude::*; |
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 log = (() => { | |
const start = Date.now(); | |
return (msg, ...args) => { | |
const elasped = Date.now() - start; | |
console.log(`%os ${msg}`, elasped / 1000, ...args); | |
}; | |
})(); | |
async function doAsyncTask(name) { | |
log("started %o", name); |
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
/* eslint-env node */ | |
const { Webpack } = require("@embroider/webpack"); | |
const variant = { | |
name: "dev", | |
runtime: "browser", | |
optimizeForProduction: false, | |
}; | |
const webpack = new Webpack( | |
__dirname, | |
__dirname + "/dist", |
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
/* eslint-env node */ | |
const { Session } = require('inspector'); | |
const fs = require('fs'); | |
const captureExit = require('capture-exit'); | |
captureExit.captureExit(); | |
/** @param exitPromise {Promise<void>} */ | |
async function runProfile(exitPromise) { |
NewerOlder