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
| https://clients2.google.com/service/update2/crx?response=redirect&os=win&arch=x64&os_arch=x86_64&nacl_arch=x86-64&prod=chromiumcrx&prodchannel=beta&prodversion=79.0.3945.53&lang=ru&acceptformat=crx3&x=id%3D<ID>%26installsource%3Dondemand%26uc |
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
| type $env:USERPROFILE\.ssh\id_rsa.pub | ssh {IP-ADDRESS-OR-FQDN} "cat >> .ssh/authorized_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
| # Mac | |
| NODE_OPTIONS="--openssl-legacy-provider" | |
| # Windows ps | |
| $env:NODE_OPTIONS="--openssl-legacy-provider" |
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
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Example", | |
| "type": "node", | |
| "request": "launch", | |
| "runtimeExecutable": "node", | |
| "runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"], |
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
| // 判断类型是否相等 | |
| type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? true : false | |
| // 条件判断 | |
| type If<C extends boolean, T, F> = C extends true ? T : F | |
| // 获取类型数组最后一个类型 | |
| type LastEl<T extends string[]> = T extends [...infer _P, infer K] ? K : never | |
| // 合法数字表达集合 |
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
| mod test; | |
| use std::{ | |
| cell::RefCell, | |
| collections::{hash_map::Entry, HashMap}, | |
| fmt::{self, Debug}, | |
| rc::Rc, | |
| }; | |
| #[derive(Debug)] |
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
| #![allow(unused)] | |
| pub fn add_big_num(num_1: &str, num_2: &str) -> String { | |
| let to_u8_arr = |num: &str| { | |
| num.split("") | |
| .filter(|&n| !n.is_empty()) | |
| .map(|n| n.parse::<u8>().unwrap()) | |
| .collect::<Vec<_>>() | |
| }; |
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 resolveData<T = any>(data: Record<string | number, any>, path: string): T { | |
| const pathArr = path.split('.') | |
| return path.length === 0 ? data : pathArr.reduce((originalData, path) => originalData[path], data) | |
| } |
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 fs = require('node:fs') | |
| const path = require('node:path') | |
| /** | |
| * Traverse files in a dir | |
| * @param {string} dirPath Dir path | |
| * @param {string[]} ext | |
| * @param {number} [deep] | |
| * @param {any[]} [collection] | |
| */ |
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
| use std::collections::HashMap; | |
| struct Solution; | |
| impl Solution { | |
| pub fn int_to_roman(int: i32) -> String { | |
| let thousands = ["", "M", "MM", "MMM"]; | |
| let hundreds = ["", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"]; | |
| let tens = ["", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"]; | |
| let ones = ["", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"]; |