Skip to content

Instantly share code, notes, and snippets.

angelospanag / index.html
Last active April 3, 2023 22:31
FastAPI with HTMX partials
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<script src=""></script>
body {
background-color: #222;
color: #fff;
font-family: Arial, sans-serif;
angelospanag /
Last active February 21, 2023 23:04
Screenshot a window on Windows and OCR using Python and Tesseract
Requires installation of Tesseract for Windows:
import pyautogui
import pytesseract
import win32gui
# Get the handle of the window you want to capture
window_handle = win32gui.FindWindow(None, "Task Manager")
angelospanag / books.html
Created February 20, 2023 21:58
HTMX trigger examples
View books.html
{%for element in elements %}
{% endfor %}
angelospanag /
Created February 22, 2021 16:17
Script to install Protonmail on Ubuntu/Debian using a deb file
# Script to install Protonmail on Ubuntu/Debian using a deb file
# Also seen on
# deb filename
# Download Protonmail Bridge deb
angelospanag /
Created March 19, 2019 11:47
Add a custom user to Ubuntu with sudo privileges, disabled password and SSH access
# Create user with disabled password
sudo adduser angelospanag --disabled-password
# Switch to the new custom user (example angelospanag)
sudo su - angelospanag
# Create .ssh folder
mkdir .ssh
chmod 700 .ssh
angelospanag /
Last active March 19, 2019 11:50
Install latest stable Docker daemon to an Ubuntu instance
# Also seen here:
sudo apt-get update
sudo apt-get -y install \
apt-transport-https \