Skip to content

Instantly share code, notes, and snippets.

@scarlson
scarlson / BaseObject.py
Last active February 11, 2022 21:16
Build and save objects based on Psycopg2 tables.
### Postgres:
#
# CREATE TABLE film (
# film_id varchar(40) CONSTRAINT firstkey PRIMARY KEY,
# did integer NOT NULL,
# date_prod date,
# imdb text,
# kind varchar(10),
# len interval hour to minute
# );
@scarlson
scarlson / playlist.sh
Last active June 15, 2024 02:35
Bash script to create .m3u playlist files for all mp3s in subdirectories
#!/bin/bash
#
# bash script to create playlist files in music subdirectories
#
# Steve Carlson (stevengcarlson@gmail.com)
find . -type d |
while read subdir
do
rm -f "$subdir"/*.m3u