This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
# | |
# Traverse a directory tree, picking embedded pictures from .MP3 and .M4A audio | |
# saving them to a “cover.{png,jpg,bmp}” (as long as the file does *not* exist) | |
# and then removing the embedded pictures from the audio file. | |
# | |
# Requires the Mutagen tag edition library: https://code.google.com/p/mutagen/ | |
# Most distributions ship in a package called “python-mutagen“. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- LPeg-based XML parser. | |
-- | |
-- * Grammar term names are the same as in the XML 1.1 | |
-- specification: http://www.w3.org/TR/xml11/ | |
-- * Action functions are missing. | |
-- | |
-- Copyright (C) 2012 Adrian Perez <[email protected]> | |
-- Distribute under terms of the MIT license. | |
-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# Copyright (C) 2012 Adrian Perez <[email protected]> | |
# Distributed under terms of the MIT license. | |
# | |
# Install as: | |
# ~/.local/bin/notmuch-launch | |
# Dependencies: | |
# wmctrl (http://tomas.styblo.name/wmctrl) | |
# xsetclasshint program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/zsh | |
# | |
# dis-symbol | |
# Copyright (C) 2012 Adrian Perez <[email protected]> | |
# | |
# Distributed under terms of the MIT license. | |
# | |
if [[ $# -lt 2 ]] ; then | |
cat <<EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'notmuch) | |
(require 'notmuch-address) | |
(notmuch-address-message-insinuate) | |
(setq notmuch-address-command "/home/aperez/.local/bin/notmuch-addrlookup") | |
(setq message-kill-buffer-on-exit t) | |
(setq mail-specify-envelope-from t) | |
(setq message-sendmail-envelope-from 'header) | |
(setq mail-envelope-from 'header) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Spinlock based on Qt atomic operations. Should be fairly portable. | |
* To use it, it is recommended to use the SpinLock::Acquire helper | |
* class to follow RAII patterns, e.g.: | |
* | |
* static SpinLock g_myLock; | |
* // ... | |
* | |
* void foo() { | |
* do_seomething(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
set -e | |
declare -r NL=' | |
' | |
# extract_patch_info filename.patch | |
# | |
# Sets the PATCH_{AUTHOR,DATE,MESSAGE,GIT_ID} globals according to the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
set -e | |
indexes=( ) | |
titles=( ) | |
read_indexes () { | |
local -a line | |
local tmp | |
local in_file=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# vim:fenc=utf-8 | |
# | |
# Copyright © 2013 Adrian Perez <[email protected]> | |
# Distributed under terms of the MIT license. | |
import zlib | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* allocator-test.cc | |
* Copyright (C) 2013 Adrian Perez <[email protected]> | |
* | |
* Distributed under terms of the MIT license. | |
*/ | |
#include <cstdlib> | |
#include <cstdio> |
OlderNewer