Skip to content

Instantly share code, notes, and snippets.

View falzm's full-sized avatar
🙃

Marc Falzon falzm

🙃
View GitHub Profile
@falzm
falzm / untag.go
Created May 18, 2019 08:27
Strip all ID3 tags from an MP3 file
package main
import (
"os"
"github.com/bogem/id3v2"
)
func main() {
tag, err := id3v2.Open(os.Args[1], id3v2.Options{Parse: true})
package main
import (
"bufio"
"bytes"
"fmt"
"net/http"
"net/http/httputil"
"os"
)
@falzm
falzm / mkcd.bash
Created March 3, 2021 08:51
Simple Bash function to create a directory and cd to it immediately. Creates a temporary directory by passing flag "-t".
mkcd() {
local dir=""
while getopts "ht" c
do
case $c in
t) dir=$(mktemp -d) ;;
h|?) echo "mkcd [-t] [DIRECTORY]" ; return ;;
esac
done
shift $((OPTIND-1))