Skip to content

Instantly share code, notes, and snippets.

View ngquerol's full-sized avatar
📖

Nicolas G. Querol ngquerol

📖
View GitHub Profile
@ngquerol
ngquerol / flac2alac.sh
Last active June 7, 2020 20:24
FLAC to ALAC Batch Converter
#!/usr/bin/env bash
shopt -s extglob
set -o errexit
set -o nounset
set -o pipefail
# Function definitions
check_prerequisites() {
/// Additional colors accessibility metrics utilities
import Cocoa
import simd
extension NSColor {
/// Returns in an ordered array the following components from this color, in the sRGB color space:
/// - red
/// - green
@ngquerol
ngquerol / dockertags.sh
Created September 8, 2016 17:52
List all available tags for a given docker image
dockertags() {
if [ -z ${1+x} ] || [ $# -ne 1 ]; then
echo "Usage: ${0} <image name>"
else
local namespace="library"
local repository=$1
if [[ $1 == *"/"* ]]; then
namespace=${1%/*}
repository=${1#*/}
@ngquerol
ngquerol / ns_system_appearance_change_emacs-27.patch
Last active April 3, 2024 17:11
Patch to make emacs (emacs-27 branch) aware of the macOS 10.14+ system appearance changes.
From 2d430cad16b7c7e62f36adf68f021b829aeff503 Mon Sep 17 00:00:00 2001
From: "Nicolas G. Querol" <[email protected]>
Date: Wed, 11 Nov 2020 11:38:05 +0100
Subject: [PATCH] Add `ns-system-appearance-change-functions' hook
This implements a new hook, effective only on macOS >= 10.14 (Mojave),
that is called when the system changes its appearance (e.g. from light
to dark). Users can then implement functions that take this change
into account, for instance to load a particular theme.
@ngquerol
ngquerol / typewriter.html
Last active April 1, 2020 18:34
Simple "typing" style animation.
<!doctype html>
<html>
<head>
<title>Typewriter</title>
<meta charset="utf-8" />
<style typeText="text/css" media="screen">
html, body {
height: 100%;
margin: 0;
}
@ngquerol
ngquerol / Makefile
Last active April 10, 2020 14:49
Generic Makefile for simple C projects, supporting compilation databases via Clang.
# Variables (all configuration should happen here)
SHELL = /bin/sh
CC = clang
CFLAGS = -Wall -Wextra -Wpedantic -std=c99
LDFLAGS =
RELEASE_CFLAGS = -Os
@ngquerol
ngquerol / ns_system_appearance_change_emacs-28.patch
Last active April 3, 2024 17:10
Patch to make emacs (emacs-28 branch) aware of the macOS 10.14+ system appearance changes.
From 2fd6ee35bbcdd0a07e882e07706edaa01815853b Mon Sep 17 00:00:00 2001
From: "Nicolas G. Querol" <[email protected]>
Date: Wed, 11 Nov 2020 12:35:47 +0100
Subject: [PATCH] Add `ns-system-appearance-change-functions' hook
This implements a new hook, effective only on macOS >= 10.14 (Mojave),
that is called when the system changes its appearance (e.g. from light
to dark). Users can then implement functions that take this change
into account, for instance to load a particular theme.
@ngquerol
ngquerol / org-mode.css
Last active May 24, 2020 08:08
Self-contained stylesheet for org-mode HTML exports
html { margin: 0; padding: 0; box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }
body {
margin: 0 auto;
padding: 0;
max-width: 700px;
color: #555;
background-color: #fafafa;
@ngquerol
ngquerol / ns_system_appearance_change.patch
Last active March 2, 2025 21:01
Patch to make emacs (master branch) aware of the macOS 10.14+ system appearance changes.
From 0a5610f0394af6f754c0dc8f50040af2d9c6a38e Mon Sep 17 00:00:00 2001
From: "Nicolas G. Querol" <[email protected]>
Date: Wed, 11 Nov 2020 12:35:47 +0100
Subject: [PATCH] Add `ns-system-appearance-change-functions' hook
This implements a new hook, effective only on macOS >= 10.14 (Mojave),
that is called when the system changes its appearance (e.g. from light
to dark). Users can then implement functions that take this change
into account, for instance to load a particular theme.
@ngquerol
ngquerol / ns_system_appearance_change_emacs-29.patch
Last active June 26, 2024 20:45
Patch to make emacs (emacs-29 branch) aware of the macOS 10.14+ system appearance changes.
From d93d19eb895055a276f8c1f3dc889a9b2946ae37 Mon Sep 17 00:00:00 2001
From: "Nicolas G. Querol" <[email protected]>
Date: Wed, 11 Nov 2020 12:35:47 +0100
Subject: [PATCH] Add `ns-system-appearance-change-functions' hook
This implements a new hook, effective only on macOS >= 10.14 (Mojave),
that is called when the system changes its appearance (e.g. from light
to dark). Users can then implement functions that take this change
into account, for instance to load a particular theme.