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
const fs = require("fs"); | |
const _ = require("lodash"); | |
const names = fs.readFileSync("./names", "utf-8").split("\n"); | |
let count = []; | |
function normalizeName(incoming) { | |
const incomingToNormalized = { | |
Sergey: "Сергей", | |
Dmitry: "Дмитрий", |
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
from telethon.sync import TelegramClient | |
from telethon.tl.functions.messages import GetDialogsRequest | |
from telethon.tl.types import InputPeerEmpty, InputPeerChannel, InputPeerUser | |
from telethon.errors.rpcerrorlist import PeerFloodError, UserPrivacyRestrictedError, SessionPasswordNeededError | |
from telethon.tl.functions.channels import InviteToChannelRequest | |
import sys | |
import csv | |
import traceback | |
import time | |
import random |
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
#!/usr/bin/env python3 | |
""" | |
This script is meant to format all java files in your repo using maven-formatter-plugin | |
""" | |
import argparse | |
import os | |
import sys | |
import subprocess |
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
"err": { | |
"type": "Error", | |
"message": "Oh no, something bad happened, try to debug me", | |
"stack": "Error: Oh no, something bad happened, try to debug me\n at Object.<anonymous> (/app/src/modules/routes/error-thrower/index.ts:8:13)" | |
} |
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
import * as sourceMapSupport from "source-map-support"; | |
sourceMapSupport.install(); |
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
npm i source-map-support |
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
"err": { | |
"type": "Error", | |
"message": "Oh no, something bad happened, try to debug me", | |
"stack": "Error: Oh no, something bad happened, try to debug me\n at Object.<anonymous> (/app/dist/modules/routes/error-thrower/index.js:17:19)" | |
} |
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
docker-compose -f docker-compose.production.yaml build | |
docker-compose -f docker-compose.production.yaml up |
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
// at the top | |
import errorThrowerRoutes from "./modules/routes/error-thrower"; | |
// make server more verbose | |
const server: fastify.FastifyInstance< | |
Server, | |
IncomingMessage, | |
ServerResponse | |
> = fastify({logger:true}); |
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
import * as fp from "fastify-plugin"; | |
export default fp(async (server, opts, next) => { | |
server.route({ | |
url: "/error-thrower", | |
method: ["GET"], | |
handler: async (request, reply) => { | |
throw new Error("Oh no, something bad happened, try to debug me"); | |
return reply.send({ date: new Date(), works: true }); | |
} |
NewerOlder