Skip to content

Instantly share code, notes, and snippets.

@dfur
dfur / Python pathlib guide.md
Last active November 19, 2022 06:33
A brief tour of all the properties and methods in the python standard library 'pathlib' module which provides easy, object oriented file handling in modern python.

Easy object-oriented file handling in modern python

A brief tour of all the properties and methods in the pathlib module.

The pathlib module is part of the Python stardard library (as of v. 3.4) and can be used can do file handling tasks previously done by multiple libraries. Instead of using mere strings to represent filepaths, pathlib uses objects that have many useful properties and methods.

For example, pathlib can replace (amongst others):

os - .rename(), .sep(), .walk(), .chmod(), .mkdir(), .stat()
os.path - .join(), .split(), .exists(), .basename()

@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active March 8, 2024 13:18
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to: