Skip to content

Instantly share code, notes, and snippets.

@Kamik
Kamik / AveryLabels.py
Created February 16, 2024 11:53 — forked from timrprobocom/AveryLabels.py
A class to manage printing on Avery labels with ReportLab
import os
from collections.abc import Iterator
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import LETTER, landscape
from reportlab.lib.units import inch
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
# Usage:
# label = AveryLabels.AveryLabel(5160)
@Kamik
Kamik / cihan.py
Created February 22, 2023 10:28 — forked from bitnik/cihan.py
Scan pdfs and rename them according to data in barcodes they contain.
import tempfile
import glob
import argparse
# import xlrd
import pandas
from os.path import join, basename
from shutil import copyfile
from pdf2image import convert_from_path # , convert_from_bytes
from pyzbar.pyzbar import decode
# from PIL import Image
@Kamik
Kamik / clean-up-boot-partition-ubuntu.md
Created November 12, 2022 01:47 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@Kamik
Kamik / maintenance.bat
Created February 23, 2020 12:13 — forked from zeegin/maintenance.bat
1c postgres maintenance and backup for windows
@echo off
chcp 65001 > nul
set E1C_RAS=localhost:3545
set E1C_RAC=C:\Program Files\1cv8\current\bin\rac.exe
set DB_SERVER=localhost:3541
set DB_NAME=1C_DATABASE
set DB_USER=1C_ADMINISTRATOR
set DB_PWD=1C_PASSWORD
set PGUSER=PG_ADMINISTRATOR
@Kamik
Kamik / interfaces
Created July 10, 2019 22:38 — forked from hazanjon/interfaces
Hetnzer Network Interface settings for Proxmox and pfSense
### Hetzner Online AG - installimage
# Loopback device:
auto lo
iface lo inet loopback
# device: eth0
auto eth0 ##Hetzner Interface
iface eth0 inet static
address <Main IP>
broadcast <Broadcast IP>