Skip to content

Instantly share code, notes, and snippets.

View bobhenkel's full-sized avatar
🚀

Bob Henkel bobhenkel

🚀
View GitHub Profile
@bobhenkel
bobhenkel / freebsd-image.md
Created July 19, 2023 03:24 — forked from chr4/freebsd-image.md
OpenStack FreeBSD image creation

FreeBSD 12.0 OpenStack image creation

This was adapted from this document

ISO image creation

Download ISO image, then run:

openstack image create --file ~/Downloads/FreeBSD-12.0-RELEASE-amd64-disc1.iso --disk-format iso --container-format bare "FreeBSD-12.0-RELEASE-amd64-disc1.iso"
@bobhenkel
bobhenkel / README
Created April 5, 2022 21:00 — forked from eqhmcow/README
docker wrapper
slightly-less-insecure-docker
wrapper around docker that perhaps makes it slightly less insecure
example usage:
DOCKER=/path/to/docker-wrapper
sudo $DOCKER run -it -v /etc/passwd:/etc/passwd -v /tmp:/tmp ubuntu
NOTE:
@bobhenkel
bobhenkel / configuration-issue-fixed.nix
Last active July 21, 2021 04:53
NixOS vmware fushion config that non-root user can't move mouse cursor or click mouse buttons, but keyboard does work. With root mouse works fine.
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, lib, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@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"]} ]}'
#
# 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 / 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
@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

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: