Skip to content

Instantly share code, notes, and snippets.

View yoshuawuyts's full-sized avatar

Yosh yoshuawuyts

View GitHub Profile
Roots for record 0 (stored at leaf 0): [ 0 ]
0: 0
Roots for record 1 (stored at leaf 2): [ 1 ]
0: 0─┐
1
1: 2─┘
Roots for record 2 (stored at leaf 4): [ 1, 4 ]
0: 0─┐
#!/bin/sh
COMMIT_MSG_FILE=$1 # The git commit file.
COMMIT_SOURCE=$2 # The current commit message.
# Add "Signed-off-by: <user> <email>" to every commit message.
SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
if test -z "$COMMIT_SOURCE"; then
/usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
@yoshuawuyts
yoshuawuyts / github_release.rb
Created August 22, 2018 16:18 — forked from valeriomazzeo/github_release.rb
Creates or update a GitHub release for the given tag name
#!/usr/bin/env ruby
require 'optparse'
require 'octokit'
options = {}
OptionParser.new do |opt|
opt.on('-s', '--secret SECRET', 'GitHub access token') { |o| options[:secret] = o }
opt.on('-r', '--repo-slug REPO_SLUG', 'Repo slug. i.e.: apple/swift') { |o| options[:repo_slug] = o }
opt.on('-c', '--changelog-file CHANGELOG_FILE', 'Changelog path') { |o| options[:changelog_file] = o }
http_04 0.1.0
Yoshua Wuyts <[email protected]>

USAGE:
    http_04 [FLAGS] [OPTIONS]

FLAGS:
    -h, --help         Prints help information
 -P, --pretty Enable pretty printing.

What middleware do we want:

  • authentication
  • authorization
  • logging
  • user management
  • caching
    • etag
  • cors
  • csrf
  • sessions
use clap_port_flag::Port;
use futures::prelude::*;
use hyper::{Body, Response, Server, service::service_fn_ok};
use structopt::{StructOpt, structopt};
#[derive(Debug, StructOpt)]
struct Cli {
#[structopt(flatten)]
port: Port,
}
#![cfg_attr(feature = "nightly", deny(missing_docs))]
#![cfg_attr(feature = "nightly", feature(external_doc))]
#![cfg_attr(feature = "nightly", doc(include = "../README.md"))]
#![cfg_attr(test, deny(warnings))]
#![cfg_attr(test, feature(plugin))]
#![cfg_attr(test, plugin(clippy))]
#[macro_use]
extern crate structopt;
extern crate actix_web;

documentation

Types of applications

  • library
  • command line

Libraries

  • API documentation

Command line applications

#[macro_use]
extern crate quickcheck;
extern crate memory_pager;
use self::Operation;
use memory_pager::Pager;
use quickcheck::{Arbitrary, Gen};
#[derive(Clone, Debug)]
enum Operation {

Weekly

  • A day to hang with friends.
  • A day in nature.
  • A day for community.

Rituals

  • Jour Fix
  • Bi-weekly sprints
  • Physical meetups
  • Re-ask the same questions