- Open Telegram application then search for
@BotFather
- Click Start
- Click Menu -> /newbot or type
/newbot
and hit Send - Follow the instruction until we get message like so
Done! Congratulations on your new bot. You will find it at t.me/new_bot.
Discover gists
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
/** | |
* Group array of objects by object key | |
* Example: | |
const pets = [ | |
{ type:"Dog", name:"Bobik", skills: { canBite: true } }, | |
{ type:"Cat", name:"Tiger", skills: { canBite: true } }, | |
{ type:"Dog", name:"Tuzik", skills: { canBite: true } }, | |
{ type:"Cat", name:"Leopold", skills: { canBite: false } } | |
]; |
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 cache = new Map() | |
const cached = (fn, fnName = '') => { | |
if (fnName) console.info(`Результат выполнения функции '${fnName}' будет закэширован`); | |
return async (...params) => { | |
const key = params.toString() | |
if (!cache.has(key) ) { | |
console.log('функция будет выполнена') |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
A simple Ghostscript command to merge two PDFs in a single file is shown below:
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH 1.pdf 2.pdf
Install Ghostscript:
Type the command sudo apt-get install ghostscript
to download and install the ghostscript package and all of the packages it depends on.
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
// A simple thread-safe queue implementation based on std::list<>::splice | |
// after a tip in a talk by Sean Parent of Adobe. | |
// | |
// Uses standard library threading and synchronization primitives together | |
// with a std::list<> container for implementing a thread-safe queue. The | |
// only special thing is that the queue uses std::list<>::splice in the | |
// locked region to minimize locked time. | |
// | |
// Also implements a maximal size and can thus be used as a buffer between | |
// the elements in a pipeline with limited buffer bloat. |
Some stats: - Total number of links: 23983
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
#公共DNS | |
##国外 | |
- Google DNS: `8.8.8.8` `8.8.4.4` | |
- OpenDNS: `208.67.222.222` `208.67.220.220` | |
- OpenNIC: `106.186.17.181`(Japan) `128.199.248.105`(Singapore) `203.248.252.2`(Korea) | |
- Comodo Secure DNS: `8.26.56.26` `8.20.247.20` | |
- Norton DNS: `198.153.192.1` `198.153.194.1` | |
- Norton ConnectSafe DNS: `199.85.126.20` `199.85.127.20` | |
--- |
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
Hey, I'm pmhieu111-54319153 and I have contributed to the RISC Zero STARK-to-SNARK Prover MPC Phase2 Trusted Setup ceremony. | |
The following are my contribution signatures: | |
Circuit # 1 (stark_verify) | |
Contributor # 148 | |
Contribution Hash: 6dc39ed5 f4fd739c 7b7ab37e 8f14b87c | |
645d496c 8ab780e1 947090f0 519dda69 | |
15bd9d2e 2a2d5a22 db3eab8d dbf2efa2 | |
f8b91c04 a8301777 6f98c2a6 3ac918f8 |
NewerOlder