Skip to content

Instantly share code, notes, and snippets.

View frimik's full-sized avatar

Mikael Fridh frimik

  • Electronic Arts / DICE
  • Uppsala, Sweden
View GitHub Profile
@frimik
frimik / Tilt.log
Created December 26, 2020 08:14
Tilt.dev, Tanka, Jsonnet experiments.
Beginning Tiltfile execution
local: tk eval environments/default -e '_tilt'
→ {
→ "megaproxy": {
→ "port_forwards": [
→ {
→ "link_path": "/haproxy/stats",
→ "name": "health",
→ "port": 8404
→ }

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@frimik
frimik / plugin.yml
Last active November 8, 2022 09:20
k9s plugin.yml
# $XDG_CONFIG_HOME/k9s/plugin.yml
plugin:
# Annotate current object with a Flux ignore annotation
fluxdepignore:
# Define a mnemonic to invoke the plugin
shortCut: Shift-I
# What will be shown on the K9s menu
confirm: true
description: Flux Ignore
@frimik
frimik / Makefile
Last active June 30, 2022 11:49
linkerd2-cni on Kubernetes via Grafana Tanka hackery.
.PHONY: vendor-cni
vendor-cni:
vendir sync
mkdir gitvendor/charts/linkerd2-cni/charts
mv gitvendor/charts/partials gitvendor/charts/linkerd2-cni/charts/partials
patch-cni:
patch -p0 <install-cni-delete-event.patch
@frimik
frimik / README.md
Last active June 12, 2020 02:16
k3d ubuntu systemd-resolved DNS hacks

DNS Hack for Ubuntu

The problem

Going on and off VPN, things work, then they don't work... general annoying. Containers can't resolve... and when you might make containers resolve, then containers in containers (k3d) can't resolve...

It seems I got things working... I can go on and off VPN, name resolution works essentially the same on the Host as in Docker and the Kubernetes (k3d) nodes and the k3d kubernetes containers.

On the host I have per-interface DNS servers via systemd-resolved that takes care of it.

@frimik
frimik / puppet-template-patterns.erb
Last active May 6, 2020 12:02
Puppet Template Patterns to remember.
## Check if variable is defined
# Replaces has_variable?(var) and if @var variations.
# include?() pattern from @Jan_vStone.
#
# scope.lookupvar return values for undefined variables:
# Puppet 3.x: nil
# Puppet 2.6.x: :undefined
# Puppet 2.7.x: :undefined
<% if ! [:undefined, nil, ''].include?(masquerade_address = scope.lookupvar('ftp::masquerade_address')) -%>
MasqueradeAddress <%= masquerade_address %>
@frimik
frimik / ecs-cloudstor-install.sh
Last active April 9, 2020 16:12
Install CloudStor plugin on Amazon ECS Optimized AMI Instance
#!/bin/bash
set -ex
if [ $# -ne 2 ]; then
echo "Usage: $0 EFS_ID_REGULAR EFS_ID_MAXIO"
exit 1
fi
EFS_ID_REGULAR=$1
@frimik
frimik / k3d-setup.sh
Created September 17, 2019 17:56
Local K3D (k3s) cluster base
#!/bin/bash
CLUSTER_NAME="k3s-default"
# Install k3d
k3d --version || wget -q -O - https://raw.githubusercontent.com/rancher/k3d/master/install.sh | bash
# verify it
k3d check-tools
# create a volume and cluster
@frimik
frimik / git-submodule-sync.rb
Created March 9, 2013 19:32
Make damn sure that git submodule sync is going to work.
#! /usr/bin/env ruby
submods = Hash.new
%x{git config -f .gitmodules --get-regexp '^submodule\..*\.(path|url)$'}.lines.each do |l|
submodule, key, value = l.match(/^submodule\.(.*)\.(path|url)\s+(.*)$/)[1..3]
submods[submodule] = Hash.new unless submods[submodule].is_a?(Hash)
submods[submodule][key] = value
end
#!/bin/bash
#
# get_secret (c) 2019 Fulhack industries.
#
# Author: Mikael Fridh
#
# Half inspired half stolen from somewhere, can't remember exactly.
#
# Use in scripts like:
# get_secret vpn_password "VPN password" [username]