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
| // Variables used by Scriptable. | |
| // These must be at the very top of the file. Do not edit. | |
| // icon-color: deep-blue; icon-glyph: chart-line; | |
| // ============================================================ | |
| // DeepSeek 余额查询(Scriptable) | |
| // | |
| // 数据来源(DeepSeek 官方 API): | |
| // 余额 GET /user/balance (官方文档接口,API key 认证,可靠) | |
| // (官方 API 不提供用量/消费查询,脚本只展示余额) |
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
| /** | |
| * Translate current buffer to fluent English using DeepSeek official API. | |
| * Place this file in your `~/.vim/coc-extensions` directory. | |
| * | |
| * Usage: | |
| * :CocCommand deepseek.translateToEnglish | |
| * | |
| * Requirement: | |
| * DEEPSEEK_API_KEY environment variable must be set (get it from | |
| * https://platform.deepseek.com/api_keys) |
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 {Uri, commands, workspace, window, Mutex} = require('coc.nvim') | |
| const path = require('path') | |
| const programMap = { | |
| javascript: 'node', | |
| typescript: 'ts-node', | |
| python: 'python' | |
| } | |
| let global_id = 0 |
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 path = require('path') | |
| const fs = require('fs') | |
| const { execSync } = require('child_process') | |
| let file = path.join(process.cwd(), 'core.wxvpkg') | |
| if (fs.existsSync(file)) { | |
| execSync(`rmtrash ${file}`) | |
| } | |
| let fd = fs.openSync(file, 'w') |
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
| // Save the file to ~/.vim/coc-extensions | |
| // Usage: xmap <silent> <TAB> <Plug>(coc-repl-sendtext) | |
| const {commands, workspace} = require('coc.nvim') | |
| exports.activate = context => { | |
| let {nvim} = workspace | |
| let terminal | |
| context.subscriptions.push(commands.registerCommand('repl.openTerminal', async () => { | |
| let filetype = await nvim.eval('&filetype') | |
| let prog = '' |
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 {sources} = require('coc.nvim') | |
| const {spawn} = require('child_process') | |
| const readline = require('readline') | |
| exports.activate = async context => { | |
| context.subscriptions.push( | |
| sources.createSource({ | |
| // unique id | |
| name: 'address', | |
| // unsed in menu |
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
| " ============================================================================ | |
| " Description: Some system commands for vim | |
| " Author: Qiming Zhao <chemzqm@gmail.com> | |
| " Licence: Vim licence | |
| " Version: 0.3 | |
| " Last Modified: Jul 07, 2018 | |
| " ============================================================================ | |
| if exists('did_system_loaded') || v:version < 700 | |
| finish |
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
| # brew install ag | |
| # brew install fzy | |
| # Usage: e [part of filename] | |
| function e | |
| set -l file (ag . --silent -l -g '' | fzy -q $argv) | |
| if test -z $file | |
| return | |
| else | |
| nvim $file | |
| end |
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
| #!/usr/bin/env node | |
| var exec = require('child_process').exec | |
| var Branch = new Promise(function(resolve, reject) { | |
| exec('git symbolic-ref -q HEAD | cut -c 12-', function (err, stdout) { | |
| if (err) return reject(err) | |
| if (stdout.length) return resolve(stdout.replace('\n', '')) | |
| exec('git rev-parse --short HEAD', function (err, stdout) { | |
| if (err) return reject(err) |
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
| var PENDING = 'pending' | |
| var SEALED = 'sealed' | |
| var FULFILLED = 'fulfilled' | |
| var REJECTED = 'rejected' | |
| var NOOP = function(){} | |
| function isArray(value) { | |
| return Object.prototype.toString.call(value) === '[object Array]' | |
| } |
NewerOlder