Skip to content

Instantly share code, notes, and snippets.

@tiimk
tiimk / protconf.py
Created June 30, 2024 17:26
Create configs and auto vpn swapping
import http.client
import http.cookies
import json
import base64
import hashlib
import os
import random
import argparse
import time
from cryptography.hazmat.primitives import serialization

Install Pop OS 20.04

Follow this guide, partition your disk a install Pop OS 20.04 from live USB :

  • Boot from live USB
  • Partition your hard disk: EFI Boot, BTRFS root, EXT4 home, SWAP
  • Install Pop OS and DO NOT REBOOT
mount -o subvolid=5,ssd,noatime,space_cache,commit=120,compress=zstd /dev/sdb5 /mnt
@awerlang
awerlang / README
Last active June 24, 2024 15:50
A zypper wrapper that maximizes network throughput
zypper-download
===============
Downloads packages using any amount of available openSUSE mirrors.
Installation
------------
Copy both files to the following locations:
@pmarreck
pmarreck / encrypt_decrypt.sh
Last active September 23, 2021 20:18
Some easy bash scripts to encrypt/decrypt data, for anyone who wants to go all cloak&dagger. (bitcoin private keys, etc.)
# Encryption functions. Requires the GNUpg "gpg" commandline tool. On OS X, "brew install gnupg"
# Explanation of options here:
# --symmetric - Don't public-key encrypt, just symmetrically encrypt in-place with a passphrase.
# -z 9 - Compression level
# --require-secmem - Require use of secured memory for operations. Bails otherwise.
# cipher-algo, s2k-cipher-algo - The algorithm used for the secret key
# digest-algo - The algorithm used to mangle the secret key
# s2k-mode 3 - Enables multiple rounds of mangling to thwart brute-force attacks
# s2k-count 65000000 - Mangles the passphrase this number of times. Takes over a second on modern hardware.
# compress-algo BZIP2- Uses a high quality compression algorithm before encryption. BZIP2 is good but not compatible with PGP proper, FYI.
@arq5x
arq5x / test.sh
Last active February 26, 2025 13:17
Compress and then Decompress a string with zlib.
# compile
$ g++ zlib-example.cpp -lz -o zlib-example
# run
$ ./zlib-example
Uncompressed size is: 36
Uncompressed string is: Hello Hello Hello Hello Hello Hello!
----------
@elssar
elssar / grab_pdfs.py
Created March 14, 2013 11:48
Download all the pdf files linked in a given webpage.
#!/usr/bin/env python
"""
Download all the pdfs linked on a given webpage
Usage -
python grab_pdfs.py url <path/to/directory>
url is required
path is optional. Path needs to be absolute
@zealinux
zealinux / convert.demo.sh
Created September 26, 2012 13:59
imagemagick convert cheat sheet
= IMAGEMAGICK
Working with images, PDFs and the command line
# convert from one format to another
convert image.gif image.jpg
# convert specific PDF page to image