Skip to content

Instantly share code, notes, and snippets.

View ratijas's full-sized avatar
🔓
gpg --recv-keys 16FE1EF864EAFBE8209247FAAE69C4B00B02FC69

ratijas ratijas

🔓
gpg --recv-keys 16FE1EF864EAFBE8209247FAAE69C4B00B02FC69
View GitHub Profile
@ratijas
ratijas / 1-Webhooks_pyTelegramBotAPI.md
Last active June 14, 2022 15:35
Examples of webhook using pyTelegramBotAPI (BaseHTTPServer, Flask and CherryPy).

Webhook examples using pyTelegramBotAPI

There are 3 examples in this directory using different libraries:

  • Python (CPython): webhook_cpython_echo_bot.py
    • Pros:
      • Official python libraries, it works out of the box (doesn't require to install anything).
      • Works with Python 2 and Python 3 (need to be converted with 2to3).
  • Cons:

rage-quit plugin for oh-my-zsh

based on rage-quit support for bash

HOW TO INSTALL

Put the files below inside ~/.oh-my-zsh/custom/plugins/fuck

Add fuck to the loaded plugins inside your .zshrc, and enjoy. Autocomplete is included.

@ratijas
ratijas / playground.rs
Created April 8, 2020 13:37 — forked from rust-play/playground.rs
Using Box<[T]> in Rust for multi-dimensional arrays
use std::{fmt, ops};
pub struct Array2D<T> {
width: usize,
height: usize,
data: Box<[T]>,
}
impl<T> Array2D<T> {
pub fn new(size: (usize, usize)) -> Self