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
import { Easing, Series, staticFile } from "remotion"; | |
import { | |
AbsoluteFill, | |
interpolate, | |
Sequence, | |
useCurrentFrame, | |
Img, | |
Audio, | |
} from "remotion"; | |
import { z } from "zod"; |
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
1 |
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
apiVersion: v1 | |
kind: Endpoints | |
metadata: | |
name: cloudtower-perf | |
namespace: prometheus | |
subsets: | |
- addresses: | |
- ip: 1.2.3.5 | |
nodeName: tower.smartx.com | |
- ip: 1.2.3.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
// ==UserScript== | |
// @name i18n editor | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @include /?i18n-editor/ | |
// @grant none | |
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/jszip.min.js | |
// @require https://raw.githubusercontent.com/eligrey/FileSaver.js/master/dist/FileSaver.js |
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 lastOf(arr) { | |
return arr[arr.length - 1]; | |
} | |
function getCurrentStatement(ast) { | |
if (ast.body.length === 0) { | |
throw new Error("No statement found"); | |
} | |
return lastOf(ast.body); | |
} | |
function getCurrentFrom(ast) { |
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 sessionId = Cypress.env('sessionId'); | |
const appFrame = window.parent.document.querySelectorAll('iframe')[0]; | |
Cypress.on('window:load', () => { | |
appFrame.contentWindow.eval(` | |
const request = new XMLHttpRequest(); | |
request.open('GET', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/rrweb.min.js', false); | |
request.send(''); | |
const script = document.createElement('script'); | |
script.type = 'text/javascript'; |
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
>>> callback here | |
added element type node <body>…</body> | |
[found with selector "div p"] | |
added element type node <div>…</div> | |
[found with selector "div p"] | |
added element type node <p></p> | |
added element type node <script></script> | |
>>> callback here | |
added element type node <a></a> |
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 longTask(int, callback) { | |
if (int < 0) { | |
callback(new Error('less than 0')); | |
} else { | |
callback(null, 'done'); | |
} | |
} | |
// callback | |
longTask(1, (err, result) => {}); |
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
docker run -i \ | |
--rm \ | |
--name node-test \ | |
-v "$PWD":/code \ | |
-w /code node:latest \ | |
/bin/bash -c "npm i --silent --progress=false --registry=https://registry.npm.taobao.org && npm run test" |
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 lodash = require('lodash'); | |
const toArray = require('../utils/toArray'); | |
const { CONSTANTS: C } = require('../globals'); | |
const NAME_ALIAS = '名称'; | |
function hint(options) { | |
const rules = ['Check your selector value.']; | |
if (!options.debug) { | |
rules.push('Add { debug: true } to your options to get more info.'); |
NewerOlder