Skip to content

Instantly share code, notes, and snippets.

View narayann7's full-sized avatar
๐Ÿš€
Just Tinkering!!

Narayan narayann7

๐Ÿš€
Just Tinkering!!
View GitHub Profile

STL cheat sheet.

Vector

initialization :

vector<int> v;
vector<int> v(n); //n is size of array
vector<int> v={1,2,3,4};

Steps to host your Telegram bot

Heroku:

  • Create a Telegram bot with Telegraf API.
  • Create account on Heroku.
  • Install Heroku CLI.
  • Install and setup git.
  • Add micro-bot to the project
    npm i micro-bot 
@narayann7
narayann7 / 1. Email validation.md
Last active May 24, 2022 06:44
common handy functions

Email validation

//dart
bool isEmail(String email) {
  String reg =
      r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$';

  RegExp regExp = RegExp(reg);

Git cheat sheet

what is git? : here , install git here

Setup :

  • $ git config --global user.name "{name}" for configure username
  • $ git config --global user.email "{email}" for configure email
  • $ git config --list check all username , email configured or not