Skip to content

Instantly share code, notes, and snippets.

View SandySanSan's full-sized avatar
💭
Wild Code School 2019

SandyP SandySanSan

💭
Wild Code School 2019
View GitHub Profile
@dl6nm
dl6nm / Grafana-TelegramBot-HowTo.md
Last active December 13, 2023 16:21 — forked from subzeta/gist:26cd1a1f1526411862b3a3a0b4422d3d
How to create a Grafana bot for Telegram

Set up a Telegram Bot

  1. Go to Grafana > Alerting > Notification channels > New channel.
  2. Type: Telegram. It will ask you for a Bot API Token and a Chat ID.
  3. Open a chat with BotFather on Telegram.
  4. Type /newbot
  5. Type your bots name. e.g. Grafana Bot
  6. Type your bots username. e.g. a_new_grafana_bot
  7. You get your Bot API Token. Paste it on Grafana.
  8. Before making getUpdates (in the next step) you should add your bot into your telegram client and run /start. Thus you start chatting with the bot and this room is assigned chat id. (Thanks to @KES777)
@s4mf3nn
s4mf3nn / app.js
Created March 15, 2019 17:04
Découverte de NodeJS
process.stdin.resume()
process.stdin.setEncoding('utf8')
console.log('what\'s your age ?')
process.stdin.on('data', (age) => {
if (age >= 99) {
console.log('Your must be under 100')
}
else if (isNaN(age)) {
console.log('You must specify an age');

Terminal

Le terminal sert à acceder au contenu de l’ordinateur sans interface graphique. Il sert à :

  • manipuler des fichiers

  • installer des logiciels

  • etc