Skip to content

Instantly share code, notes, and snippets.

View RepSklvska's full-sized avatar
🍋

Alexander Sokolov RepSklvska

🍋
View GitHub Profile
@RepSklvska
RepSklvska / sizeConversion.ts
Last active September 27, 2020 03:17
File size formatting - TypeScript
// 传入一个B为单位的整数,返回适合在文件浏览器里显示的三位数加两位小数的大小,带单位,抹零。
// 可以把整个函数的定义放进tsun命令行中进行测试
// tsun安装方式:npm i -g typescript tsun
// 例如:
// 102369888 -> 97.63MB
// 527360 -> 515KB
// 4680843264 -> 4.36GB
@RepSklvska
RepSklvska / sizeConversion.go
Last active September 27, 2020 03:17
File size formatting - Golang
// 传入一个B为单位的整数,返回适合在文件浏览器里显示的三位数加两位小数的大小,带单位,抹零。
// 例如:
// 102369888 -> 97.63MB
// 527360 -> 515KB
// 4680843264 -> 4.36GB
package abc
import (
@RepSklvska
RepSklvska / eoLatinToCyrillic.go
Last active July 14, 2021 00:11
eoLatinToCyrillic.go
// Esperanto, latina al cirila.
package main
import "fmt"
var (
string1 string = "Esperanto, origine la Lingvo Internacia, estas la plej disvastiĝinta internacia planlingvo. En 1887 Esperanton parolis nur manpleno da homoj; Esperanto havis unu el la plej malgrandaj lingvo-komunumoj de la mondo. Ĝi funkciis dekomence kiel lingvo de alternativa komunikado kaj de arta kreipovo."
mapLC map[rune]rune = map[rune]rune{
'A': 'А', 'a': 'а',
// Image manipulation with @pixi/node
// https://github.com/pixijs/node
import { CommandInteraction, CacheType, AttachmentBuilder } from 'discord.js'
import { Application, Assets, Sprite } from '@pixi/node'
import path from 'path'
export const drawImage = async (interaction: CommandInteraction<CacheType>) => {
await interaction.deferReply({ ephemeral: true })