Skip to content

Instantly share code, notes, and snippets.

View JeanMertz's full-sized avatar

Jean Mertz JeanMertz

View GitHub Profile
@zargony
zargony / config.yml
Last active December 16, 2020 16:47
CircleCI 2.0 configuration for Rust library crate project
version: 2
jobs:
test:
docker:
- image: rust:1
steps:
- checkout
- run:
name: Version information
@posener
posener / go-table-driven-tests-parallel.md
Last active April 30, 2024 20:34
Be Careful with Table Driven Tests and t.Parallel()

Be Careful with Table Driven Tests and t.Parallel()

We Gophers, love table-driven-tests, it makes our unittesting structured, and makes it easy to add different test cases with ease.

Let’s create our table driven test, for convenience, I chose to use t.Log as the test function. Notice that we don't have any assertion in this test, it is not needed to for the demonstration.

func TestTLog(t *testing.T) {
	t.Parallel()
@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 23, 2024 03:59
Swift Concurrency Manifesto
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 23, 2024 22:24
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@d4l3k
d4l3k / about.md
Last active February 16, 2023 10:56
Golang Performance Tricks

This is a gist with a set of helpful performance tricks and best practices that I've found on the internet.

@atcuno
atcuno / gist:3425484ac5cce5298932
Last active March 25, 2024 13:55
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

@koenbollen
koenbollen / ns.py
Last active August 29, 2015 14:14
Alerts for NS issues by keyword.
#!/usr/bin/env python3
# Koen Bollen, 2015
import sys
import urllib.request
import xml.etree.ElementTree
# Train stations you are interested in:
keywords = ("utrecht", "bijlmer", "amstel")
# If one of those keywords is found in the
@dnozay
dnozay / _Jenkins+Script+Console.md
Last active May 3, 2024 09:33
jenkins groovy scripts collection.
@skippy
skippy / boot.sh
Last active September 27, 2020 17:54
starting a consul cluster via fleet. 3 servers are started, and clients fill out the rest of the fleet. If you want to get specific, add `MachineMetadata` to specifically place where consul-servers will spend up
#!/bin/bash
# set -eo pipefail
export CONSUL_NUM_INSTANCES=${CONSUL_NUM_INSTANCES:-3}
echo " => stopping consul"
fleetctl stop -block-attempts=10 \
$(eval echo "consul-server@{1..$CONSUL_NUM_INSTANCES}.service") \
consul-agent.service
# FIXME: sometimes it takes awhile for systemd to stop things...
@romaninsh
romaninsh / swapon.service
Created December 1, 2014 10:05
Set up swap on CoreOS
create this file in your /root folder
$ fleetctl load swapon.service
$ fleetctl start swapon.service
This will create swap file on all nodes of your CoreOS cluster without prior setup.
See also http://cloudinit.readthedocs.org/en/latest/topics/examples.html#adjust-mount-points-mounted