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
/** | |
* @author ThomasChan | |
* @usage deno run --allow-read --allow-write --unstable moveFiles.ts | |
*/ | |
// Define SD card and OneDrive folder absolute path | |
const sdCardPath = '/Volumes/Untitled/MP_ROOT'; // replace to your sd card full absolute path | |
const oneDrivePath = '/Users/<yourusername>/OneDrive'; // replace to your OneDrive full absolute path | |
// Create folder if not exists |
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
/** | |
* @author ThomasChan | |
* @usage deno run --allow-net reassignee.ts --token=xxx --assignee=AAA --assignTo=BBB | |
*/ | |
import { Gitlab } from 'https://esm.sh/@gitbeaker/rest?dts'; | |
function parseArgs(args: string[]) { | |
const params: { [key: string]: string } = {}; | |
args.forEach(arg => { | |
const [key, value] = arg.split('='); |
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
/** | |
* @author ThomasChan | |
* @usage | |
deno run --allow-net moveIssues.ts \ | |
--host=https://gitlab.test.org \ | |
--token=xxxx \ | |
--projectId=1 \ | |
--milestoneName="1.1" \ | |
--labelsToMatch="P2" \ | |
--labelsToExclude="customer,enhancement,feature" \ |
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
/** | |
* [synchServerTime 弱心跳渐强同步服务器时间] | |
* @author ThomasChan | |
* @param {int} beginTime [当前时间] | |
* @param {int} endTime [结束时间] | |
* @param {function} iterator [每次同步完时间要做的事] | |
* @return | |
* @usage | |
* synchServerTime( | |
* +new Date() |