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
/* | |
* AES-NI support functions | |
* | |
* Copyright (C) 2013, Brainspark B.V. | |
* | |
* This file is part of PolarSSL (http://www.polarssl.org) | |
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> | |
* | |
* All rights reserved. | |
* |
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
#include <stdint.h> | |
#include <stdbool.h> | |
#include <string.h> | |
#include <polarssl/pk.h> | |
/* Initialise DER encoded key string*/ | |
const char privkey_str[] = "3081d302010104208ea106a78201d7bfc11af5c9230803db1eb104e0a4f47fa3af4a23a785584206a08185308182020101302c06072a8648ce3d0101022100fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f300604010004010704210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798022100fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141020101a12403220002a6ce40504bd48f6e71eaa27784705ba457463fb3b746e881350a09af2b850afc"; | |
bool decode_hex(unsigned char *p, size_t max_len, const char *hexstr, size_t *out_len_) | |
{ |
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 | |
# visual diff of two pdfs | |
# | |
# inspired by: | |
# http://usakuv.blogspot.fr/2011/05/visual-diff-for-pdf-files.html | |
# https://docs.google.com/document/pub?id=10GBd9u4e-NwNCd-4t4hb9rcdKJlFFhkkq-b_ezzg73c | |
print_help() { | |
echo "Usage: $0 a.pdf b.pdf diff.pdf" >&2 |
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/python -tt | |
# coding: utf-8 | |
# Manuel Pégourié-Gonnard, 2012. WTFPL v2. | |
""" | |
biglumber-sort - sort keys from a biglumber page by mean shortest distance | |
Example: | |
biglumber-sort 'http://biglumber.com/x/web?sc=Paris' |
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/perl | |
# etcorphan - list files in /etc not belonging to an installed Debian package | |
# | |
# Usage: etcorphan [ exclude_file... ] | |
# | |
# A lot of files don't formally belong to any package (eg because they are | |
# generated by an installation script) but are legitimate. You may want to | |
# ignore those files. The exclude files indicated on the command line use | |
# basically the same format as gitignore: one pattern per linei (supported |
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
// "Clean up ext links" user script for Greasemonkey. | |
// version 1.0 2011-05-07 | |
// Written by Manuel Pégourié-Gonnard <[email protected]> in 2011. WTFPL v2. | |
// | |
// -------------------------------------------------------------------- | |
// | |
// This is a Greasemonkey user script. | |
// | |
// To install, you need Greasemonkey: | |
// https://addons.mozilla.org/en-US/firefox/addon/748 |
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
-- distsel.lua: start a cmd.exe windows with another TeX distro activated | |
-- Manuel Pégourié-Gonnard, 2010. WTFPL v2. | |
local usage = [[texlua c:\path\to\distsel.lua DistName C:\path\to\distro]] | |
-- arguments | |
if not arg[2] then | |
io.stderr:write('Usage: ' .. usage) | |
os.exit(1) | |
end |
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/sh | |
# Enable fonts from texmf-local using updmap-sys --enable Map | |
# | |
# Manuel Pégourié-Gonnard, 2010; WTFPL v2. | |
find -H `kpsewhich --var-value TEXMFLOCAL` -name '*.map' | while read file | |
do | |
updmap-sys --nohash --nomkmap --enable Map `basename $file` | |
done |
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/sh | |
# Split a git repo in multiple repositories, one per top-level directory. | |
# | |
# assume there are no spaces in dir names etc. | |
# assume the git repo is in the working directory | |
# Manuel Pégourié-Gonnard, 2009, WTFPLv2. | |
# This is gist #137698 <http://gist.github.com/137698> |
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 texlua | |
-- A simple UTF-8 validator in Lua. (Tested only with texlua.) | |
-- Manuel Pégourié-Gonnard, 2009, WTFPL v2. | |
-- returns true if s is a valid utf-8 sequence according to rfc3629 | |
function is_valid_utf8(str) | |
local len = string.len(str) | |
local not_cont = function(b) return b == nil or b < 128 or b >= 192 end | |
local i = 0 |