Skip to content

Instantly share code, notes, and snippets.

@zero734kr
zero734kr / config.json
Last active July 28, 2019 12:55
디스코드 봇 인덱스
{
"prefix": "접두사",
"token": "토큰"
}
const fetch = require("node-fetch")
exports.run = async(client, message, args) => {
let query = args.join(" ")
if (!query) return message.channel.send(`${message.author} 님, 검색할 키워드를 입력 해주세요.`)
const body = await fetch(`https://djsdocs.sorta.moe/v2/embed?src=https://raw.githubusercontent.com/discordjs/discord.js/docs/stable.json&q=${encodeURI(query)}`).then(res => res.json())
if (!body) return message.channel.send(`${message.author} 님, 검색 결과가 없습니다.`)
const Command = require("../utils/command")
const fetch = require("node-fetch")
class Docs extends Command {
constructor(client) {
super(client)
this.name = "docs"
this.aliases = ["doc", "djs"]
this.category = "개발"
//...
client.on("message", async message => {
//if(...) return 설정들
/**
* 아래 두개의 선언이 뭘 하는것인지 알고 싶으시다면:
* @see https://github.com/Zero-Brazil734/discord.js-bot-index/blob/master/index.js#L22
* */
const args = message.content.slice("접두사".length).trim().split(/ +/g)
@zero734kr
zero734kr / style.css
Created March 17, 2020 13:45
Stylesheet for wikiciencias
.box {
border: 1px solid block;
width: 450px;
}
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
echo "-----------------------------------------------[#]-----------------------------------------------"
sudo apt-get install -y nodejs
echo "-----------------------------------------------[#]-----------------------------------------------"
sudo apt install gcc g++ make
echo "-----------------------------------------------[#]-----------------------------------------------"
sudo npm i -g npm
echo "-----------------------------------------------[#]-----------------------------------------------"
sudo npm i -g pm2
echo "-----------------------------------------------[#]-----------------------------------------------"
const Command = require("../utils/command")
class Limit extends Command {
constructor(client) {
super(client)
this.name = "채팅제한"
this.aliases = ["coxldwpgks"]
this.category = "관리"
this.description = "도배를 막기 위해 명령어 입력으로 특정 채널에 줄 바꿈 채팅 제한을 거는 기능"

유용한 Visual Studio Code 단축키 목록

현재 입력 중인 라인 전체 제거

  • Ctrl + shift + K

현재 입력 중인 라인 모두 선택

  • Ctrl + L

터미널 토글 (열고 닫기)

  • Ctrl + `
@zero734kr
zero734kr / README.md
Last active May 11, 2021 15:53
Web/HTTP Frameworks in Node.js, Python and Deno Benchmark

Test Environment:

Executed command: hey -cpus 12 -c 100 -n 10000000 http://localhost:4500

  • CPU: AMD Ryzen 5600X (6 Cores 12 Threads)
  • OS: Linux Mint 20.1
  • Query Response: Hello World
  • Number of threads for parallel request: 12
  • Request Concurrency: 100
  • Total number of requests: 10000000