This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils | |
sudo apt install gnome-boxes | |
sudo apt install virt-manager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested from Peppermint OS (Debian 12) | |
sudo apt install libcurl4-openssl-dev libgd-dev libonig-dev libzip-dev build-essential autoconf libtool bison re2c pkg-config libxml2-dev libssl-dev libsqlite3-dev libpq-dev libreadline-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
du -h --max-depth=1 | grep '[0-9]G\>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install tesseract-ocr | |
sudo apt install libtesseract-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://security.stackexchange.com/a/219325 | |
sha256() { | |
echo "$1 $2" | sha256sum --check | |
} | |
# sha256 <expected-sha-256-sum> <name-of-the-file> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name example.com; | |
root /home/myuser/mydjangoproject/staticfiles/; | |
index index.html; | |
proxy_headers_hash_max_size 512; | |
proxy_headers_hash_bucket_size 128; | |
# Proxy connections to the application servers | |
# app_servers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install unp | |
mkdir /tmp/FiraCode/ | |
pushd /tmp/FiraCode/ | |
# https://github.com/ryanoasis/nerd-fonts/releases/ | |
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/FiraCode.tar.xz | |
unp FiraCode.tar.xz | |
popd | |
mkdir -p ~/.local/share/fonts/ | |
mv /tmp/FiraCode ~/.local/share/fonts/ | |
fc-cache -f -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
from datetime import datetime | |
#print(len(sys.argv)) | |
if len(sys.argv) == 4: | |
birthday = " ".join(sys.argv[1:4]) | |
elif len(sys.argv) == 3: | |
birthday = " ".join(sys.argv[1:3]) + " x" | |
elif len(sys.argv) == 1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Boot the Ubuntu Live CD. | |
# https://help.ubuntu.com/community/LiveCdRecovery | |
# Press Ctrl-Alt-F1 | |
chr=/mnt/ | |
sudo mount /dev/sda1 $chr | |
sudo mount --bind /dev $chr/dev | |
sudo mount --bind /proc $chr/proc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps -eo size,pid,user,command --sort -size | \ | |
awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' |\ | |
cut -d "" -f2 | cut -d "-" -f1 | |
# Find gunicorn specific | |
ps -eo size,pid,user,command --sort -size | \ | |
awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' |\ | |
cut -d "" -f2 | cut -d "-" -f1 | grep gunicorn |
NewerOlder