Skip to content

Instantly share code, notes, and snippets.

@OsoPanda1
OsoPanda1 / gban.py
Last active May 3, 2024 15:10
Gban for Telegram
'fban_gbanimport asyncio
from telethon.tl.types import MessageEntityMentionName
from userbot import CMD_HELP, bot, is_mongo_alive, is_redis_alive
from userbot.events import register
from userbot.modules.dbhelper import (add_chat_fban, add_chat_gban, get_fban,
get_gban, remove_chat_fban,
remove_chat_gban)
@andrei-yapily
andrei-yapily / pojo_to_yaml.py
Created May 3, 2024 14:59
This Python script converts Plain Old Java Object (POJO) strings into YAML models following the OpenAPI Specification format. It supports parsing POJOs with properties of primitive types, nested objects, arrays, and enum classes.
import re
import yaml
from typing import Dict, Any
def pojo_to_yaml(pojo_str: str) -> Dict[str, Any]:
"""
Convert a POJO (Plain Old Java Object) string to a YAML model.
Args:
@minoue
minoue / README.md
Last active May 3, 2024 15:07
simple setter and getter example
@lukasvice
lukasvice / cover_position_tilt.yaml
Last active May 3, 2024 15:02
Home Assistant script to control venetian blinds with Shelly
# Have a look at the blog post about this script:
# https://medium.com/@lukasvice/a-utility-script-for-controlling-venetian-blinds-with-shelly-in-home-assistant-2e5cbf2d8d5f
script:
cover_position_tilt:
mode: parallel
fields:
entity_id:
description: "The cover entity"
example: "cover.X"
@bradtraversy
bradtraversy / terminal-commands.md
Last active May 3, 2024 14:58
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:

  • Up Arrow: Will show your last command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen
@tathamoddie
tathamoddie / demo2.yaml
Created August 30, 2020 05:23
ESPHome demo config for M5Stack Atom Lite
substitutions:
device_name: demo2
friendly_name: Demo 2
## Boilerplate
esphome:
name: ${device_name}
platform: ESP32
board: m5stack-core-esp32
@fredgrott
fredgrott / launch.json
Created June 7, 2021 21:10
vscode example launch.json for flutter dev
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
// per dart-flutter extensions directions at: https://dartcode.org/docs/launch-configuration/
//
// although one can, NEVER EVER put any define args in these launch configs as it's
// too easy to by mistake include private keys and have them end up in the
// git repo.
//
@seanh
seanh / html_tags_you_can_use_on_github.md
Last active May 3, 2024 14:57
HTML Tags You Can Use on GitHub

HTML Tags You Can Use on GitHub

Wherever HTML is rendered on GitHub (gists, README files in repos, comments on issues and pull requests, ...) you can use any of the HTML elements that GitHub Flavored Markdown (GFM) provides syntactic sugar for. You can either use the syntactic sugar that GFM (or other GitHub-supported markup language you're using) provides or, since Markdown can contain raw HTML, you can enter the HTML tags manually.

But GitHub also allows you to use a few HTML elements beyond what Markdown provides by entering the tags manually, and some of them are styled with CSS. Most raw HTML tags get stripped before rendering the HTML. Those tags that can be generated by GFM syntactic sugar, plus a few more, are whitelisted. These aren't documented anywhere that I can find. Here's what I've discovered so far:

<details> and <summary>

A `<detai

@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 3, 2024 14:54
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.