Skip to content

Instantly share code, notes, and snippets.

@RF5
RF5 / flac2mp3.py
Created June 25, 2019 19:01
Python script to rapidly convert folders of flac audio files to mp3, preserving metadata and cover art
# pip install fastprogress
# pip install pydub
from pydub import AudioSegment
from pydub.utils import mediainfo
from fastprogress import progress_bar
import os
import glob
from pathlib import Path
from concurrent.futures.process import ProcessPoolExecutor
@philipjewell
philipjewell / photobucket_bulk_download.md
Last active March 29, 2023 00:23
Download all your photobucket images in bulk via CLI

backstory

On Jul 4, 2017 theverge.com posted an article about photobucket (silently) no longer allowing their users to source their images on 3rd party websites for free, thus leaving websites all over the web broken displaying the following image in replace:

Me being one of those individual, I attempted to go into my photobucket account and download my content as I now have my own hosting I am able to store those images on; however, the only ways to bulk download (on desktop) is by downloading albums through their interface. Doing so, gave me the following error message: "Hmmm. Something didn't click. Want to give it another shot? Try again now."

Doing this serveral times, in different browsers (chrome, firefox and safari), after disabling all my addons and extensions (including ad blockers), it still didn't work.

At this point, doing anything on their website w

@tomcatzh
tomcatzh / gzip_compress_reader.go
Last active April 3, 2024 09:30
Wrap a reader to a gzip compress reader using gzip writer :-P
func NewGzipReader(source io.Reader) io.Reader {
r, w := io.Pipe()
go func() {
defer w.Close()
zip, err := gzip.NewWriterLevel(w, gzip.BestSpeed)
defer zip.Close()
if err != nil {
w.CloseWithError(err)
}
@marians
marians / main.go
Created January 27, 2017 10:25
OAuth 2.0 authentication in a Golang CLI
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
"net/http"
"net/url"
"time"