Instantly share code, notes, and snippets.

View truth-table.csv
Develop Current Task QA Current Task QA Older Task Release Current Task Release Older Task Release Even Older Task On Time
T T T T T T T
T T T T T F F
T T T T F T F
T T T T F F F
T T T F T T F
T T T F T F F
T T T F F T F
T T T F F F F
T T F T T T F
View truth-table.csv
Develop QA Release On Time
T T T T
T T F F
T F T F
T F F F
F T T F
F T F F
F F T F
F F F F
View truth-table.csv
Develop Release On Time
T T T
F T F
T F F
F F F
View main.go
package main
import (
"golang.org/x/oauth2"
"github.com/google/go-github/github"
"context"
"fmt"
"time"
"os"
"log"
View lib.rs
#![cfg_attr(test, feature(plugin))]
#![cfg_attr(test, plugin(quickcheck_macros))]
extern crate core;
#[cfg(test)]
extern crate quickcheck;
use core::iter;
use std::ops::Add;
#[derive(Ord, PartialOrd, PartialEq, Eq, Debug, Clone, Copy)]
View lib.rs
#![cfg_attr(test, feature(plugin))]
#![cfg_attr(test, plugin(quickcheck_macros))]
#[cfg(test)]
extern crate quickcheck;
fn fizz_buzz(number: i32) -> String {
let mut result = String::new();
if number % 3 == 0 {
result.push_str("Fizz")
View gist:663be4a3b931b475d4620fee58e6ad3d
pub fn validate_commit(message: &str) -> Result<&str, &str> {
check_gap_between_subject_and_body(message)
.and_then(check_subject_line_longer_than_50_characters)
.and_then(check_body_line_longer_than_72_characters)
}
fn check_gap_between_subject_and_body(message: &str) -> Result<&str, &str> {
has_one_line(message)
.or_else(|| has_empty_second_line(message))
.ok_or("No gap between subject and body.")
View commit-msg
#!/usr/bin/env bash
# Put this in ".git/hooks/commit-msg"
# and make it executable
# chmod a+x ".git/hooks/commit-msg"
set -euo pipefail
MSG="$1"
View pipeline.yml
resources:
- name: rollerderbyrss-version
type: semver
source:
driver: git
uri: git@github.com:PurpleBooth/versions.git
branch: rollerderbyrss
private_key: ((github_private_key))
initial_version: 0.3.0
View .gitmessage
# Short (50 chars or less) summary of changes
#
# More detailed explanatory text, if necessary. Wrap it to
# about 72 characters or so. In some contexts, the first
# line is treated as the subject of an email and the rest of
# the text as the body. The blank line separating the
# summary from the body is critical (unless you omit the body
# entirely); tools like rebase can get confused if you run
# the two together.