Skip to content

Instantly share code, notes, and snippets.

@petrilli
petrilli / main.py
Last active December 28, 2024 13:14
Example combination of FastAPI and Pydantic with aiosql and aiosqlite
# -*- coding: utf-8 -*-
"""Example combination of FastAPI and Pydantic with aiosql and aiosqlite.
This module demonstrates the minimum viable integration approach for putting
together a few components:
- FastAPI. This provides a very high-performance and type-driving approach to
building APIs in Python
- Pydantic. A powerful data validation library.
- aiosql. Inspired by annosql and originally Clojure's yeSql, a way to programatically,
@judero01col
judero01col / Service KMS
Last active December 28, 2024 13:14
Volume License Activation Key Service - KMS
## Find Available Target Editions
DISM.exe /Online /Get-TargetEditions
## Convert Server Standard 2019 Evaluation to Server Standard 2019
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
## How To Activate
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /skms [server]:[port]
slmgr /ato
@pommicket
pommicket / win64_call.asm
Last active December 28, 2024 13:12
Call C functions with a dynamic number of arguments x64 MSVC
;;; Call C functions with a dynamic number of arguments x64 MSVC ;;;
;;; Written in NASM ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This is free and unencumbered software released into the public domain.
;;
;; Anyone is free to copy, modify, publish, use, compile, sell, or
;; distribute this software, either in source code form or as a compiled
;; binary, for any purpose, commercial or non-commercial, and by any
;; means.
;;
@fnky
fnky / ANSI.md
Last active December 28, 2024 13:11
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@sassman
sassman / flamegraph-pr.yml
Created December 15, 2024 21:53
GitHub Action for flamegraphs on PR as comment
name: Flamegraph PR
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
@glasslion
glasslion / vtt2text.py
Last active December 28, 2024 13:09
This script convert youtube subtitle file(vtt) to plain text.
"""
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.
@Tarikul-Islam-Anik
Tarikul-Islam-Anik / Competitive Programming Template.cpp
Last active December 28, 2024 13:08
Here's my personal competitive programming template for C++. I'll keep it updated as my programming journey progresses. Have some suggestions or tips? Please comment down below. I would love to hear that.
#include <bits/stdc++.h>
using namespace std;
//IO
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(NULL)
#define tc int t; cin >> t; while(t--)
#define cases cout << "Case " << cnt << ": "
#define get_arr(arr, n) fori(i,n) cin >> arr[i]
#define print_arr(arr, n) fori(i,n) cout << arr[i] << " "; cout << endl
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active December 28, 2024 13:08
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@doctor-g
doctor-g / workflow.yml
Last active December 28, 2024 13:07
Workflow to publish a Flutter Web app to GitHub Pages
name: Deploy to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- master
jobs:
deploy:
@gabe565
gabe565 / change-arc-icon.md
Last active December 28, 2024 13:03
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon on macOS.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy