From fb477c9e589beeb0480940e76a1399ce0ce90570 Mon Sep 17 00:00:00 2001 From: luk Date: Tue, 18 Aug 2026 23:55:52 +0800 Subject: [PATCH] u --- claude-config.js | 2 +- claude-config.sh | 4 +-- dcloud-renew/README.md | 2 +- dcloud-renew/package.json | 2 +- mkdir-tree.js | 73 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 mkdir-tree.js diff --git a/claude-config.js b/claude-config.js index 75a91b1..a9a5dca 100644 --- a/claude-config.js +++ b/claude-config.js @@ -88,7 +88,7 @@ async function main () { const existingAuthToken = existingEnv.ANTHROPIC_AUTH_TOKEN || '' const existingBaseUrl = existingEnv.ANTHROPIC_BASE_URL || '' - const existingModel = existingEnv.ANTHROPIC_MODEL || 'glm-5.2' + const existingModel = existingEnv.ANTHROPIC_MODEL || 'glm-5.3' const rl = readline.createInterface({ input: process.stdin, diff --git a/claude-config.sh b/claude-config.sh index 4c56f5b..fe0cfd5 100644 --- a/claude-config.sh +++ b/claude-config.sh @@ -6,12 +6,12 @@ mkdir -p "$(dirname "$settings_file")" existing_auth_token="" existing_base_url="" -existing_model="glm-5.2" +existing_model="glm-5.3" if [ -f "$settings_file" ]; then existing_auth_token="$(jq -r '.env.ANTHROPIC_AUTH_TOKEN // empty' "$settings_file" 2>/dev/null)" existing_base_url="$(jq -r '.env.ANTHROPIC_BASE_URL // empty' "$settings_file" 2>/dev/null)" - existing_model="$(jq -r '.env.ANTHROPIC_MODEL // "glm-5.2"' "$settings_file" 2>/dev/null)" + existing_model="$(jq -r '.env.ANTHROPIC_MODEL // "glm-5.3"' "$settings_file" 2>/dev/null)" fi echo "Please provide your Anthropic configuration." diff --git a/dcloud-renew/README.md b/dcloud-renew/README.md index daf09eb..ca3a506 100644 --- a/dcloud-renew/README.md +++ b/dcloud-renew/README.md @@ -22,5 +22,5 @@ Add to crontab to run automatically: # # Install with: crontab /Users/Shared/product-产品/opx/sysconfig/dcloud-renew/crontab.txt # (That replaces your whole crontab; use `crontab -e` to merge with existing entries.) -0 1 26 * * /Users/Shared/product-产品/opx/sysconfig/dcloud-renew/renew-all.sh >> /tmp/dcloud-renew.log 2>&1 +0 1 26 * * source renew-all.sh >> /tmp/dcloud-renew.log 2>&1 ``` diff --git a/dcloud-renew/package.json b/dcloud-renew/package.json index eb6d941..b8f21a4 100644 --- a/dcloud-renew/package.json +++ b/dcloud-renew/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "type": "module", "description": "", - "main": "renew.js", + "main": "renew.mjs", "scripts": { "begin": "npm install && npx playwright install-deps && npx playwright install chromium", "fire": "source renew-all.sh", diff --git a/mkdir-tree.js b/mkdir-tree.js new file mode 100644 index 0000000..b354b5d --- /dev/null +++ b/mkdir-tree.js @@ -0,0 +1,73 @@ +const fs = require('fs'); +const path = require('path'); + +const letters = 'abcdefghijklmnopqrstuvwxyz'.split(''); + +const wordsByLetter = { + a: ['almond', 'amber', 'apricot', 'atlas', 'aurora', 'avocado', 'alpine', 'amethyst', 'anchor', 'aspen'], + b: ['bamboo', 'beacon', 'berry', 'blossom', 'brisk', 'brook', 'bison', 'butter', 'breeze', 'birch'], + c: ['cabin', 'canyon', 'cedar', 'cinder', 'clover', 'copper', 'coral', 'crimson', 'cumulus', 'currant'], + d: ['daisy', 'delta', 'dune', 'drift', 'dolphin', 'dream', 'durian', 'dewdrop', 'dandelion', 'dynamo'], + e: ['elm', 'ember', 'echo', 'everest', 'eclipse', 'enigma', 'estate', 'eagle', 'elder', 'emerald'], + f: ['falcon', 'fern', 'fig', 'flame', 'forest', 'frost', 'fable', 'fairy', 'fjord', 'fusion'], + g: ['garland', 'gem', 'ginger', 'glacier', 'granite', 'grove', 'garnet', 'grape', 'gull', 'galaxy'], + h: ['harbor', 'hazel', 'heather', 'horizon', 'hunter', 'hyacinth', 'honey', 'hollow', 'harvest', 'holly'], + i: ['island', 'ivory', 'iris', 'inferno', 'ivy', 'indigo', 'icicle', 'ignite', 'imprint', 'inlet'], + j: ['jasmine', 'jet', 'juniper', 'journey', 'jungle', 'joy', 'jasper', 'jolly', 'jacket', 'jade'], + k: ['kepler', 'kiwi', 'kestrel', 'knoll', 'kale', 'kernel', 'kimber', 'koral', 'kite', 'kraken'], + l: ['lagoon', 'lantern', 'lemon', 'lilac', 'lunar', 'linden', 'lotus', 'lark', 'lattice', 'larch'], + m: ['maple', 'marble', 'meadow', 'meteor', 'mint', 'moss', 'mango', 'monarch', 'morrow', 'mulberry'], + n: ['nectar', 'nelson', 'nimbus', 'north', 'nova', 'nutmeg', 'nori', 'night', 'narrow', 'nymph'], + o: ['oak', 'opal', 'orchid', 'orbit', 'otter', 'olive', 'onyx', 'oasis', 'ocean', 'omega'], + p: ['pebble', 'petal', 'pine', 'poppy', 'prairie', 'quartz', 'pixel', 'pocket', 'panda', 'plume'], + q: ['quill', 'quartz', 'quiver', 'quest', 'quince', 'quiet', 'quasar', 'quick', 'quokka', 'quarry'], + r: ['rain', 'raven', 'reed', 'ridge', 'river', 'rose', 'roam', 'ripple', 'ruby', 'ranger'], + s: ['sage', 'saffron', 'salmon', 'sandal', 'sequoia', 'shadow', 'spruce', 'summit', 'sunset', 'safflower'], + t: ['tide', 'timber', 'topaz', 'thistle', 'travel', 'trident', 'tulip', 'tundra', 'talon', 'teal'], + u: ['umbra', 'unity', 'ultra', 'upland', 'utopia', 'uranus', 'umbrella', 'unicorn', 'urban', 'uphill'], + v: ['valley', 'velvet', 'verve', 'violet', 'vivid', 'voyage', 'vapor', 'vulture', 'vine', 'willow'], + w: ['water', 'watson', 'willow', 'whisper', 'wren', 'wander', 'walnut', 'weaver', 'wisp', 'winter'], + x: ['xenon', 'xeric', 'xylem', 'xenial', 'xylophone', 'xanthic', 'xenith', 'xerus', 'xavier', 'xylograph'], + y: ['yarrow', 'yalow', 'yellow', 'yonder', 'yew', 'yogurt', 'yonder', 'young', 'yarn', 'yearn'], + z: ['zephyr', 'zenith', 'zebra', 'zinnia', 'zoe', 'zucchini', 'zen', 'zesty', 'zonal', 'zorro'] +}; + +function randomWord(letter) { + const list = wordsByLetter[letter] || ['word']; + return list[Math.floor(Math.random() * list.length)]; +} + +function generateTree(baseDir, depth, currentDepth = 1) { + if (currentDepth > depth) { + return; + } + + for (const letter of letters) { + const word = randomWord(letter); + const dirName = word; + const fullPath = path.join(baseDir, dirName); + + fs.mkdirSync(fullPath, { recursive: true }); + + if (currentDepth < depth) { + generateTree(fullPath, depth, currentDepth + 1); + } + } +} + +function main() { + const depthArg = process.argv[2]; + const depth = Number.parseInt(depthArg, 10); + + if (!Number.isInteger(depth) || depth < 1) { + console.log('Usage: node generate-nested-random-dirs.js '); + console.log('Example: node generate-nested-random-dirs.js 3'); + process.exit(1); + } + + const currentDir = process.cwd(); + generateTree(currentDir, depth, 1); + console.log(`Created directory tree to depth ${depth} under ${currentDir}`); +} + +main();