Skip to content

Instantly share code, notes, and snippets.

View NickKelly1's full-sized avatar

nickk NickKelly1

  • MyEtherWallet
  • Los Angeles, California
View GitHub Profile
@NickKelly1
NickKelly1 / grafana_telegram_bot.md
Created December 19, 2022 01:13 — forked from ilap/grafana_telegram_bot.md
Grafana Telegram Alert

Config Telegrambot for grafana's alerts.

1. Create bot

Open Telegram and search for @BotFather user and message them the following:

You
/newbot 

BotFather
@NickKelly1
NickKelly1 / grafana_telegram_bot.md
Created December 19, 2022 01:13 — forked from ilap/grafana_telegram_bot.md
Grafana Telegram Alert

Config Telegrambot for grafana's alerts.

1. Create bot

Open Telegram and search for @BotFather user and message them the following:

You
/newbot 

BotFather
@NickKelly1
NickKelly1 / Grafana-TelegramBot-HowTo.md
Created December 19, 2022 01:12 — forked from dl6nm/Grafana-TelegramBot-HowTo.md
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)
@NickKelly1
NickKelly1 / script_mysql_secure_installation.sh
Created April 14, 2022 22:13 — forked from pietrorea/script_mysql_secure_installation.sh
Installs mysql 8, secures it, creates a user and db
#!/bin/bash
set -e
# Sets up an new myql instalation (Ubuntu 20.04)s
# 1. Downloads mysql-server if necessary
# 2. Secures the installation
# 3. Sets the root password
# 4. Creates an app related DB
@NickKelly1
NickKelly1 / before-shutdown.js
Created April 13, 2022 22:25 — forked from nfantone/before-shutdown.js
Node.js graceful shutdown handler
'use strict';
/**
* @callback BeforeShutdownListener
* @param {string} [signalOrEvent] The exit signal or event name received on the process.
*/
/**
* System signals the app will listen to initiate shutdown.
* @const {string[]}
@NickKelly1
NickKelly1 / .md
Created April 8, 2022 01:38 — forked from joepie91/.md
Running a Node.js application using nvm as a systemd service

Read this first!

Hi there! Since this post was originally written, nvm has gained some new tools, and some people have suggested alternative (and potentially better) approaches for modern systems. Make sure to have a look at the comments to this article, before following this guide!


The original article

Trickier than it seems.

@NickKelly1
NickKelly1 / bash_strict_mode.md
Created April 8, 2022 01:37 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@NickKelly1
NickKelly1 / ssh-here-document.sh
Created March 31, 2022 07:25 — forked from pietrorea/ssh-here-document.sh
SSH config here document
cat > /etc/ssh/sshd_config << "EOF"
Include /etc/ssh/sshd_config.d/*.conf
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
...
EOF