This file contains 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
/* | |
* Run this through the C/C++ preprocessor like this: | |
* | |
* cpp -nostdinc -w -P input.css.in | sed 'y/$/#/' > output.css | |
* | |
* Note that the C/C++ preprocessor always interprets octothorpe characters | |
* at beggining of lines as preprocessor directives. Use sollar signs instead | |
* to avoid the trouble. Dollar signs are changed into octothorpes using | |
* "sed" after passing the source through the preprocessor. | |
* |
This file contains 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 python | |
# -*- coding: utf-8 -*- | |
# vim:fenc=utf-8 | |
# | |
# Copyright © 2015 Adrian Perez <aperez@igalia.com> | |
# | |
# Distributed under terms of the MIT license. | |
import bottle | |
import hipack, yaml, json |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>HiPack Web Service Test</title> | |
<script type="text/javascript"> | |
function convertHiPack() { | |
var req = new XMLHttpRequest(); | |
req.onload = function () { | |
if (req.readyState == 4) { |
This file contains 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
/* | |
* Silly example demonstrating that it is valid to jump | |
* to arbitrary labels inside "switch" statements using | |
* "goto" in C. | |
*/ | |
bool is_not_small_power_of_two (int value) | |
{ | |
if (value < 0) { | |
/* It is legal to jump into a switch */ |
This file contains 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 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 <aperez@igalia.com> | |
# 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 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 <aperez@igalia.com> | |
# | |
# Distributed under terms of the MIT license. | |
# | |
if [[ $# -lt 2 ]] ; then | |
cat <<EOF |
This file contains 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 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
// Run with: d8 --allow-natives-syntax callfunction.js | |
function f1(n, cb, thisArg) { | |
for (var i = 0; i < n; i++) { | |
cb.call(thisArg, i); | |
} | |
} | |
function f2(n, cb, thisArg) { | |
for (var i = 0; i < n; i++) { |
This file contains 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 |
OlderNewer