Skip to content

Instantly share code, notes, and snippets.

View loderunner's full-sized avatar
👨‍💻
𝚌𝚘𝚍𝚎 𝚕𝚒𝚏𝚎

Charles Francoise loderunner

👨‍💻
𝚌𝚘𝚍𝚎 𝚕𝚒𝚏𝚎
View GitHub Profile
@nmarley
nmarley / README.md
Last active March 10, 2024 23:59
Go / C++ bindings example

Go / C++ bindings example

This is an example of Go code calling to a C++ library with a C wrapper.

Build

go build  # this only ensures it compiles
from mutagen.easyid3 import EasyID3 as Tag
from os import listdir
from re import sub
for f in listdir('.'):
if (f[-4:] == '.mp3'):
try:
tag = Tag(f)
except:
tag = Tag()
@loderunner
loderunner / flac2mp3.sh
Last active August 29, 2015 14:01
Converts all flac files in the directory to high-quality mp3
#!/bin/sh
# Converts all flac files in the directory to high-quality mp3
for flacfile in *.flac
do
flac --decode "$flacfile"
wavfile="${flacfile:0:(${#flacfile}-4)}wav"
lame -b320 -q0 -ms "$wavfile"
rm "$wavfile"
done
@nanoant
nanoant / sidebar.m
Created September 27, 2011 10:52
Change your Lion sidebar item icons
// (l) copyleft 2011 Adam Strzelecki nanoant.com
//
// Usage:
// sidebar - to see the ids of your favorite sidebar items
// sidebar ItemName - to remove item specific icon
// sidebar ItemName sbBj - to set specific item icon, see:
// /System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist
// Compile it with:
// gcc -o sidebar sidebar.m -F /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks -framework Foundation -framework CoreServices
//