Skip to content

Instantly share code, notes, and snippets.

View bobhenkel's full-sized avatar
🚀

Bob Henkel bobhenkel

🚀
View GitHub Profile
@bobhenkel
bobhenkel / pr_etiquette.md
Created December 18, 2017 17:31 — forked from mikepea/pr_etiquette.md
Pull Request Etiquette

Pull Request Etiquette

Why do we use a Pull Request workflow?

PRs are a great way of sharing information, and can help us be aware of the changes that are occuring in our codebase. They are also an excellent way of getting peer review on the work that we do, without the cost of working in direct pairs.

Ultimately though, the primary reason we use PRs is to encourage quality in the commits that are made to our code repositories

Done well, the commits (and their attached messages) contained within tell a story to people examining the code at a later date. If we are not careful to ensure the quality of these commits, we silently lose this ability.

Converge

Converge is a configuration management tool that makes it easy to manage servers, laptops and other devices.

  • Easy to install and run.
  • Includes a powerful graph engine that automatically generates dependencies and runs tasks in parallel.
  • API-first. All communication runs through grpc.
dash_id=xxxx
api_key=xxx
app_key=xxx
# 1. export
curl -X GET "https://app.datadoghq.com/api/v1/dash/${dash_id}?api_key=${api_key}&application_key=${app_key}" > dash.json
# 2. edit dash.json
move "graphs", "title", "description" up one level in the json hierarchy, from being beneath "dash" to being at the same level
@bobhenkel
bobhenkel / pipeline.sh
Created September 4, 2018 13:55 — forked from toolmantim/pipeline.sh
Ensuring Buildkite pipeline steps run on the same agent, using a dynamic pipeline generator script
#!/bin/bash
# Outputs a pipeline that targets agents that have the same 'name' meta-data
# value as the step that does the pipeline upload. This means that all the
# steps will run on the same agent machine, assuming that the 'name' meta-data
# value is unique to each agent.
#
# Each agent needs to be configured with meta-data like so:
#
# meta-data="name=<unique-name>"

Keybase proof

I hereby claim:

  • I am bobhenkel on github.
  • I am bobhenkel (https://keybase.io/bobhenkel) on keybase.
  • I have a public key ASATsp7hpNkKlRnCBlXa_H3Y5cZL7mL5wzFWOpfBa6PtNQo

To claim this, I am signing this object:

@bobhenkel
bobhenkel / gist:e81c3ffebf66708a9bd079bd291f6a02
Created December 18, 2018 22:02
dind k8s local docker registry
https://github.com/kubernetes-sigs/kubeadm-dind-cluster/issues/56
Run registry in docker on your host:
$ docker run -d -p 5000:5000 --restart=always --name registry registry:2
Now localhost:5000 is a registry url.
$ docker tag alpine:3.6 localhost:5000/alpine:3.6
$ docker push localhost:5000/alpine:3.6
...
3.6: digest: sha256:d6eda1410b93902ac84bdd775167c84ab59e5abadad88791d742fea93b161e93 size: 528
@bobhenkel
bobhenkel / gist:4eabdf490d68e1d81d31cb696a87ca95
Created December 18, 2018 22:04
git-crypt basic usuage
https://coderwall.com/p/kucyaw/protect-secret-data-in-git-repo
'''
We use Ansible to manage our infrastructure, so a lot of configurations are stored in a git repository. Some of this configuration are potential dangerous if made public (like SSL certificate, GPG keys, ...) therefore we prefer to encrypt this data in the git repository.
To encode this data we use git-crypt.
Install git-crypt
Depending on your OS you need to install git-crypt, with homebrew is really simple:
brew install git-crypt
#
# The header of the application manifest uses the same signature as a Kubernetes
# resource.
#
apiVersion: cluster.gravitational.io/v2
kind: Cluster
metadata:
# The cluster name as shown to the end user, must be a single alphanumeric word
name: MyCluster
#
# The header of the application manifest uses the same signature as a Kubernetes
# resource.
#
apiVersion: cluster.gravitational.io/v2
kind: Cluster
metadata:
# The cluster name as shown to the end user, must be a single alphanumeric word
name: MyCluster
@bobhenkel
bobhenkel / clone-all-twitter-github-repos.sh
Created September 13, 2019 03:52 — forked from caniszczyk/clone-all-twitter-github-repos.sh
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'