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
// Based on https://stackoverflow.com/a/23898449/266720 | |
void tallymarker_hextobin(const char * str, uint8_t * bytes, size_t blen) | |
{ | |
uint8_t pos; | |
uint8_t idx0; | |
uint8_t idx1; | |
// mapping of ASCII characters to hex values | |
const uint8_t hashmap[] = | |
{ |
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
#include <stdio.h> | |
#include <stddef.h> | |
#include <assert.h> | |
#include "robinhoodhash.h" | |
struct entry { | |
int key; | |
char value; | |
}; |
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
#include <stdio.h> | |
#include <string.h> | |
#include <zlib.h> | |
#include <inttypes.h> | |
#include <assert.h> | |
uint8_t dict[4096]; | |
size_t dict_size; |
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 14 columns, instead of 11. in line 9.
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
AlphaMode,4,[53][C0],-,-,-,0,u,,,*,*,*,Alpha Video Mode. Presence of this Element indicates that the BlockAdditional Element could contain Alpha data. | |
AspectRatioType,4,[54][B3],-,-,-,0,u,*,*,*,*,*,"Specify the possible modifications to the aspect ratio (0: free resizing, 1: keep aspect ratio, 2: fixed)." | |
AttachedFile,2,[61][A7],mand.,mult.,-,-,m,*,*,*,*,,An attached file. | |
AttachmentLink,3,[74][46],-,-,not 0,-,u,*,*,*,*,,The UID of an attachment that is used by this codec. | |
Attachments,1,[19][41][A4][69],-,-,-,-,m,*,*,*,*,,Contain attached files. | |
Audio,3,[E1],-,-,-,-,m,*,*,*,*,*,Audio settings. | |
BitDepth,4,[62][64],-,-,not 0,-,u,*,*,*,*,*,"Bits per sample, mostly used for PCM." | |
BitsPerChannel,5,[55][B2],-,-,-,0,u,,,,*,,Number of decoded bits per channel. A value of 0 indicates that the BitsPerChannel is unspecified. | |
Block,3,[A1],mand.,-,-,-,b,*,*,*,*,*,Block containing the actual data to be rendered and a timestamp relative to the Cluster Timecode. (see Block Structure) | |
BlockAddID,5,[EE],mand.,-,not 0,1,u,*,*,* |
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
// Source: http://unix.stackexchange.com/a/251769/17594 | |
// Modifications: long long, exit codes, diagnostics | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <limits.h> | |
#include <sys/ptrace.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> |
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/perl -C63 | |
# Converts | |
# The -quick- _brown_ =fox= ^jumps^ +over+ ~the~ @lazy@ dog. | |
# into | |
# The q̶u̶i̶c̶k̶ b̲r̲o̲w̲n̲ f̳o̳x̳ j̅u̅m̅p̅s̅ o̱v̱e̱ṟ t̴h̴e̴ l̿a̿z̿y̿ dog. | |
# | |
# Implemented by Vitaly "_Vi" Shukela in 2016. Public domain / CC-0. | |
use strict; |
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
Aggregated data and plots: https://docs.google.com/spreadsheets/d/1lZ0D9ximUQuBydBsv-ASZ7L4NLMqipeg1o34z3LGbxY/edit#gid=0 | |
System: | |
Linux vi-notebook 4.4.8-grsec-64+ #78 SMP PREEMPT Fri May 6 01:12:25 FET 2016 x86_64 GNU/Linux | |
Userland is 32-bit Linux Debian jessie/wheezy (bup is running in 32-bit mode) | |
Python 2.7.9 | |
12 Gigabytes of RAM installed | |
There is considerable background activity. |
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
// cargo-deps: time="0.1.34" scgi="0.3.3" | |
extern crate scgi; | |
extern crate time; | |
use std::io::Write; | |
use std::net::TcpListener; | |
use std::thread::spawn; | |
use std::io::Read; | |
use std::fs::File; |
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 | |
ENVTEMPLATER_SEPARATOR='%' | |
if [[ -z "$1" || $1 = "--help" ]]; then | |
echo >&2 "Usage: T_template1=substitution1 ... T_templateN=substitutionN envtemplater arg%...%template ... arg%...%template -- command [arguments]" | |
echo >&2 "Example: T_github=ALTURL_%0%=https://github.com/vi/%0% envtemplater dive%github fdlinecombine%github -- submodule_update_alturl.sh --force" | |
exit 1 | |
fi |
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/sh | |
unset CDPATH | |
cd_to_toplevel () { | |
cdup=$(git rev-parse --show-toplevel) && | |
cd "$cdup" || { | |
echo >&2 "Cannot chdir to $cdup, the toplevel of the working tree" | |
exit 1 |