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
# How to use this | |
# 1. Rename the model you want to convert into '1' | |
# 2. Copy the script into the text editor in the blender (you can find it in the Scripting tab, create a file and rename it into gen.py if needed) | |
# 3. Click the start button. | |
# It may spend a long time to covert it due to the slow runtime speed of python. Blender might keep no response. Just wait patiently. | |
# You can see the progress in the console. Open the console by clicking Window->Switch system console. | |
# By MicroBlock | |
# 2021.2.1 | |
# If you are changing the script and republishing it, please include the original author and address |
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
<body onload="a=30;setInterval(()=>{t.innerText=`aa${(a--)||location.reload()}`},1000)"><c style="text-align: center;"><h1>xxxx</h1><h3 id=t><h3>WGzeyu |
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
pm2 start server.ts --interpreter="node" --node-args="-r esbuild-register" |
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 selectAnyElement() { | |
return new Promise((resolve, reject) => { | |
if(document.querySelector('.tinyNCM-Selected')){ | |
reject("Already selecting"); | |
return; | |
} | |
// create fixed tips | |
let tips = dom("div", | |
{ | |
style: { |
This file has been truncated, but you can view the full file.
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
// extracted from ncm 2.10.8, with lots of betterncm plugins installed | |
.playbackrate-settings { right: 140px !important; }.playbackrate-settings-popup { position: fixed; transition: opacity 0.2s ease 0s, transform 0.2s ease 0s; opacity: 0; padding: 15px; border-radius: 10px; background-color: rgba(0, 0, 0, 0.204); backdrop-filter: blur(10px); transform: translateY(10px); z-index: 99999; color: white; }.playbackrate-settings-popup * { color: white; }.pbr-slider-wrapper { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 20px; position: relative; padding-bottom: 4px; overflow: hidden; transition: all 0.3s ease 0s; }.pbr-slider-label { margin-bottom: 12px; }.pbr-slider { appearance: none; background-color: rgba(223, 225, 228, 0.133); border-radius: 20px; width: 100%; height: 8px; }.pbr-slider:first-child { margin-top: 5px; }.pbr-slider::-webkit-slider-thumb { appearance: none; width: 10px; height: 10px; background: rgb(255, 255, 255); cursor: pointer; border-radius: 10px; transition |
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 apiMap = {} | |
function make_proxy(obj, path = '') { | |
if (typeof obj === "object" || typeof obj === "function") | |
return new Proxy(obj, { | |
get(target, prop) { | |
if (prop === '_origin_') return obj._origin_ ?? obj; | |
const fullPath = path ? `${path}.${String(prop)}` : String(prop); |
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 findPaths(obj, kwd, maxDepth = 1, exclude=[]) { | |
const paths = []; | |
function exploreObject(obj, path, depth) { | |
if (depth > maxDepth) { | |
return; | |
} | |
for (const key in obj) { | |
const value = obj[key]; |
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 FloatingWindow { | |
static instanceCount = 0; | |
constructor() { | |
let body = document.body; | |
this.containerDiv = document.createElement('div'); | |
this.containerDiv.setAttribute('style', | |
`bottom: ${10 + 110 * FloatingWindow.instanceCount}px;` | |
); |
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 createElementDelegate = (ele, config) => { | |
const old2NewMap = new WeakMap(), new2OldMap = new WeakMap(); | |
const clone = (ele, {cloneParent, syncProps, delegateEvents=true, delayedElementListChange}={}) => { | |
if(ele == null) return ele; | |
// clone, and delegate events, and preserve parent classes | |
let cloned = ele.cloneNode(); | |
old2NewMap.set(ele, cloned); | |
new2OldMap.set(cloned, ele); | |
// clone child also |
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
#!/bin/bash | |
# Check if running with sudo | |
if [ "$EUID" -ne 0 ]; then | |
echo "Please run with sudo:" | |
echo "sudo $0" | |
exit | |
fi | |
# Enable PWM |
OlderNewer