Skip to content

Instantly share code, notes, and snippets.

CONFIG_XEN=y
CONFIG_XEN_DOM0=y
CONFIG_XEN_PRIVILEGED_GUEST=y
CONFIG_XEN_PVHVM=y
CONFIG_XEN_MAX_DOMAIN_MEMORY=500
CONFIG_XEN_SAVE_RESTORE=y
# CONFIG_XEN_DEBUG_FS is not set
CONFIG_PCI_XEN=y
CONFIG_XEN_PCIDEV_FRONTEND=m
CONFIG_XEN_BLKDEV_FRONTEND=y
#include "stdio.h"
void turrible(int a, int b) {
int* ptr = (&a);
while (*++ptr != a);
*ptr = b;
}
int main() {
int i = 125;
@hkolbeck
hkolbeck / json.go
Last active December 22, 2015 14:49 — forked from chrisdickinson/json.go
package main
/*ck imports are usually in one block, like`import (...)`, each import still on its own line */
import "math"
import "container/list"
import "strconv"
/*ck There are automated tools for adding/removing imports as you dev, v. worthwhile */
//import "fmt"
import "os"
import "encoding/json"
@hkolbeck
hkolbeck / Reading Topics
Created September 24, 2013 16:37
Reading Topics
Lattice Consensus
Causal Consistancy
@hkolbeck
hkolbeck / gist:6966069
Last active December 25, 2015 10:59
A <s>quick</s> stab at an explanation of Regular Expressions

Regular expressions are often very intimidating, in part because they are so information-dense and because a symbol's meaning can depend entirely on context. Unlike many things in computer science, regular expressions actually get easier (at least in my opinion) when you go back to the backing theory.

Regular expressions (regexes for short) are like equations for text. Specificaly they describe some number of similar pieces of text such that if we have some text and a regular expression we can ask "Does this text contain the pattern described by this regex?" We'll assume the text we want to examine is some basic english, which strangely has only the letters 'a', 'b', and 'c'. I'll surround regular expressions with forward slashes (/), and text with double quotes (") To start of with, we'll have only a few tools for doing that:

type ThingPool struct {
pool chan *Thing
generator func() *Thing
destructor func(*Thing)
}
func NewThingPool(poolSize int, generator func() *Thing, destructor func(*Thing)) *ThingPool {
p := &ThingPool{
pool : make(chan *Thing, poolsize),
generator : generator,
declare -A ignoredCommands
ignoredCommands=( 'ls' 1 'cd' 1 'echo' 1 'rmdir' 1 'mkdir' 1 'touch' 1 'man' 1 'ln' 1 'pwd' 1 )
function pre_exec {
COMMAND=$(cut -f1 -d' ' <(echo $1) )
if [ ! "${ignoredCommands[$COMMAND]}" ]; then
date
fi
}
add-zsh-hook preexec pre_exec
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
output_format = i3bar
__________________
\ ) \
\ ( ( \
\ ) \
( ( \
/----------------) /\ -(-------------
//---------------/( // | (`' / |
// /_ -.;_/ \\--._ / __|
// //(_;-// | \ \-'.\ / / ||
// // ( `.__ _ ___,') / / ||
for pom in `git ls-tree -r --name-only --full-tree ${COMMIT} | grep 'pom.xml$'`; do
DIR=`dirname ${pom}`
if [ ${DIR} != '.' ]; then
mkdir ${TMP_DIR}/${DIR}
fi
git show ${COMMIT}:${pom} > ${TMP_DIR}/${pom}
done