Skip to content

Instantly share code, notes, and snippets.

View tariqk's full-sized avatar

Tariq Kamal tariqk

View GitHub Profile
@tariqk
tariqk / .XCompose.Runic
Last active March 10, 2018 09:26
Compose Key Definitions for the Runic Unicode Range (U16A0 – U16FF). Paste this into your .XCompose or Compose Key program like WinCompose.
# for Emacs: -*- coding: utf-8 -*-
# Runic (range U16AO – U16FF)
# Letters
# Elder Futhark
<Multi_key> <R> <E> <F> : "ᚠ" U16A0 # RUNIC LETTER FEHU FEOH FE F
<Multi_key> <R> <E> <f> : "ᚠ" U16A0 # RUNIC LETTER FEHU FEOH FE F
<Multi_key> <R> <e> <F> : "ᚠ" U16A0 # RUNIC LETTER FEHU FEOH FE F
<Multi_key> <R> <e> <f> : "ᚠ" U16A0 # RUNIC LETTER FEHU FEOH FE F
@tariqk
tariqk / gsheet-hashfunc.gs
Created February 10, 2018 13:03
Hash digest functions for Google Sheets — uses Utilities.computeDigest() from Google App Scripts
/**
* Returns the hash digest of a single cell or an array of cells.
*
* @param {"Sample text"} input - Text to hash.
* @param {"MD5"} algorithm - (optional) Hashing algorithm to use. Choose between MD2, MD5, SHA-1, SHA-256, SHA-384 and SHA-512. Defaults to MD5.
* @customfunction
*/
function HASH(input, algorithm) {
input = input || "" // what, nothing? FINE, you get nothing. Jerks.
if (input.map) { // check if it's an array, and make sure that the same damn algorithm is used.