- 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
package com.vishal2376.animations.ui.theme | |
import androidx.compose.animation.animateColorAsState | |
import androidx.compose.animation.core.EaseInOut | |
import androidx.compose.animation.core.animateFloatAsState | |
import androidx.compose.animation.core.tween | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.clickable | |
import androidx.compose.foundation.layout.Arrangement | |
import androidx.compose.foundation.layout.Box |
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
/** | |
* Отправляет сообщение в контент скрипт. | |
* Вызвается из обработчика (например клик по кнопке), на вход принимает событие evt из которого получаем evt.target.id | |
* Т.е. индентифицируем кнопку на которой произошло событие и отправляем и ее id в качестве темы сообщения | |
* В content.js соответсвенно добавляем слушатель: | |
* chrome.runtime.onMessage.addListener((msg, sender, response) => { // тут код if (msg.subject === ..) }); | |
* @param {event} evt | |
* @return {Promise<void>} | |
*/ | |
let sendMsgToContent = async function (evt) { |
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
// https://codepen.io/erratir/pen/aboqxKZ | |
// MVC — Controller — создает модель и отображение и знакомит их между собой, дальше модель и отображение общаются напрямую | |
// user-view.js | |
const render = (html) => { | |
const element = document.createElement(`div`); | |
element.innerHTML = html; | |
return element; | |
}; |
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
// https://codepen.io/erratir/pen/xxKYevd | |
// MVP — Presenter — создает модель и отображение, после чего отвечает за связывание их между собой: | |
// слушает изменения в каждом из них и вызывает обновления | |
// user-view.js | |
const render = (html) => { | |
const element = document.createElement(`div`); | |
element.innerHTML = html; | |
return element; | |
}; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="style.css"> | |
<script src="script.js"></script> | |
</head> | |
<body> | |
<input type="text"> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
This note explains how to build Postgres from source and setup to debug it using LLDB on a Mac. I used this technique to research this article: | |
http://patshaughnessy.net/2014/10/13/following-a-select-statement-through-postgres-internals | |
1. Shut down existing postgres if necessary - you don’t want to mess up your existing DB or work :) | |
$ ps aux | grep postgres | |
pat 456 0.0 0.0 2503812 828 ?? Ss Sun10AM 0:11.59 postgres: stats collector process | |
pat 455 0.0 0.0 2649692 2536 ?? Ss Sun10AM 0:05.00 postgres: autovacuum launcher process | |
pat 454 0.0 0.0 2640476 304 ?? Ss Sun10AM 0:00.74 postgres: wal writer process | |
pat 453 0.0 0.0 2640476 336 ?? Ss Sun10AM 0:00.76 postgres: writer process |
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
DECLARE | |
/* aqui van las variables */ | |
BEGIN | |
/* estructura del programa, sentencias SQL */ | |
EXCEPTION | |
/* manejo de excepciones */ | |
END; | |
/* final del bloque */ |
NewerOlder