Skip to content

Instantly share code, notes, and snippets.

@HerrPi
HerrPi / build-instructions.md
Last active January 18, 2023 12:09
MINGW64: Build a static SoX (.exe) for Windows, DLL-independent with MP3 de-/encoding support (libmad and Lame encoder)

MINGW64: Build a static SoX (.exe) for Windows, DLL-independent with MP3 de-/encoding support (libmad and Lame encoder)

Here are my personal notes on compiling SoX with MINGW64. Maybe, my situation isn't representative for everyone. Or maybe, I could have achieved my goal easier. But this is the way I succeeded.

I need to build SoX as a static .exe file with MP3 de- and encoding support, to be able to normalize an existing MP3 file and save it as MP3.

I used Windows 11 Pro and MINGW64. I did another successful test with Windows 8.1.

Goal

My main goal is to be able to normalize and save back MP3 files. So I need SoX for normalization and libmad / Lame for MP3 de-/encoding. At best, I would like to port my target .exe file to other systems without the need of any depending DLL or other file.

@HerrPi
HerrPi / hg-to-git-conversion.md
Last active February 8, 2020 19:18
Mercurial to Git repo conversion (hg-to-git)
@HerrPi
HerrPi / index.html
Created May 8, 2014 15:59
Initial and (almost) empty HTML5 website with prepared CSS style and JS script sections and some other nice features (google fonts, mobile viewport, jquery).
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Page title</title>
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic,700,700italic" />
<link rel="stylesheet" href="styles.css" />
<style>
</style>
@HerrPi
HerrPi / index.js
Last active December 31, 2015 20:09
Load the first 5 bytes of a file with a jQuery ajax request. Beforehand, check whether the Range header is supported.
$(document).ready(function () {
$.ajax({
success: function (data, status, jqxhr) {
if (jqxhr.getResponseHeader("Accept-Ranges") == "bytes") {
$.ajax({
headers: {
"Range": "bytes=0-4"
},
success: function (data) {
$("pre").text(data);