Skip to content

Instantly share code, notes, and snippets.

View BooleanCat's full-sized avatar

Tom Godkin BooleanCat

View GitHub Profile
#[derive(Debug, Eq, PartialEq)]
pub enum Material {
Brick,
Concrete,
Wood,
}
#[derive(Debug)]
pub struct Blueprint {
num_floors: usize,

Outlier Inception

An inception is intended to take a group of people from ideas or notions of problems to concrete stories to be delivered. An inception consists of several roles:

  1. the participant - stakeholders which might be engineers, product managers, designers, data scientists or users
  2. the facilitator - someone who is responsible for time keeping, cat herding and making sure everyone feels safe and free to speak and is given opportunity
@BooleanCat
BooleanCat / example.txt
Created June 28, 2018 12:31
Example prime number finder using go-functional
$ go install github.com/BooleanCat/go-functional
$ go-functional int
$ ll fint/
total 40
drwxr-xr-x 2 tom tom 4096 Jun 28 13:22 .
drwxr-xr-x 3 tom tom 4096 Jun 28 13:22 ..
-rwxr-xr-x 1 tom tom 271 Jun 28 13:22 drop.go
-rwxr-xr-x 1 tom tom 367 Jun 28 13:22 exclude.go
-rwxr-xr-x 1 tom tom 354 Jun 28 13:22 filter.go
-rwxr-xr-x 1 tom tom 1017 Jun 28 13:22 functor.go
#/usr/bin/env bash
# vim: set ft=sh
set -e
DIR="$( pwd )"
if [[ "$(whoami)" != "root" ]]; then
echo "ordnance-survey needs to be run as root" 1>&2
exit 1
fi
bosh upload-release /path/to/release
# create dummy deployment manifest
cat > dummy-manifest.yml << EOF
name: compilation-workspace
releases:
- name: grootfs
version: 0.25.0
@BooleanCat
BooleanCat / func.c
Last active September 1, 2017 15:52
QtbColumn *qtb_column_new_many(size_t n) {
QtbColumn *columns;
columns = (QtbColumn *)malloc(sizeof(QtbColumn) * n);
if (columns == NULL)
return NULL;
for (size_t i = 0; i < n; i++) {
columns[i].name = NULL;
columns[i].type = NULL;
extern crate libc;
use libc::uid_t;
fn main() {
print_uids();
let mut ruid: uid_t = 0;
let mut euid: uid_t = 0;
let mut suid: uid_t = 0;
extern crate libc;
use std::mem;
use libc::{c_int, SIGINT};
unsafe extern "C" fn int_handler(_: c_int) {
println!("handled SIGINT!");
}
fn main() {
from contextlib import closing
from multiprocessing import Pool
def singleacc(account):
if 1 == 1:
return str(account[0])
return None
if __name__ == "__main__":
with open('accounts.txt') as f:
class Game(object):
_CARDS = ('''
1 3 5 7 9 11 13 15
17 19 21 23 25 27 29 31
33 35 37 39 41 43 45 47
49 51 53 55 57 59 61 63
''','''
2 3 6 7 10 11 14 15
18 19 22 23 26 27 30 31
34 35 38 39 42 43 46 47