Skip to content

Instantly share code, notes, and snippets.

View edwardbeckett's full-sized avatar

Edward J Beckett edwardbeckett

View GitHub Profile
@edwardbeckett
edwardbeckett / settings.json
Created May 18, 2024 12:13 — forked from hrko/settings.json
Msys2 terminal profiles for Visual Studio Code
"terminal.integrated.profiles.windows": {
"MINGW64 / MSYS2": {
"path": "C:/msys64/msys2_shell.cmd",
"args": [
"-defterm",
"-here",
"-no-start",
"-mingw64"
],
},
@edwardbeckett
edwardbeckett / beautiful_idiomatic_python.md
Created November 22, 2024 08:34 — forked from 0x4D31/beautiful_idiomatic_python.md
[Beautiful Idiomatic Python] Transforming Code into Beautiful, Idiomatic Python #python

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
@edwardbeckett
edwardbeckett / dpkg_missing_pkgs_fix.sh
Last active January 20, 2025 09:17 — forked from jeffersfp/fix.sh
dpkg: warning: files list file for package `*****' missing, assuming package has no files currently installed
#!/bin/bash
set -e
# Clean out /var/cache/apt/archives
apt-get clean
# Fill it with all the .debs we need
apt-get --reinstall -dy install $(dpkg --get-selections | grep '[[:space:]]install' | cut -f1)
DIR=$(mktemp -d -t info-XXXXXX)
for deb in /var/cache/apt/archives/*.deb