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
@AlexAtkinson
AlexAtkinson / gh-workflow-auth-example.yml
Created November 23, 2022 19:38
Github Workflow WITH authorization check.
name: "Full Job Example"
on:
workflow_dispatch:
inputs:
version:
description: Version (See Releases)
required: true
jobs:
@Duologic
Duologic / export.jsonnet
Last active June 7, 2022 00:26
Pure jsonnet implementation of `tanka export` (POC)
{
local this = self,
local clusterWideKinds = [
'APIService',
'CertificateSigningRequest',
'ClusterRole',
'ClusterRoleBinding',
'ComponentStatus',
'CSIDriver',
@dln
dln / ingressgateway_probes.yaml
Created September 17, 2019 07:46
kustomize from istio helm chart + gke ingress health checks
apiVersion: apps/v1
kind: Deployment
metadata:
name: istio-ingressgateway
spec:
template:
spec:
containers:
- name: istio-proxy
readinessProbe:
@tom-butler
tom-butler / local-k8s.sh
Created May 16, 2019 04:43
Local kubernetes cluster using k3d, with pvc support
#!/bin/bash
# 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
docker volume create kube-volume
@miguelmota
miguelmota / graceful_exit.go
Last active April 17, 2022 20:08
Golang graceful quit (exit) example
package main
import (
"os"
"os/signal"
"syscall"
"fmt"
"time"
"net/http"
)
func main() {
@kchida
kchida / gist:d1c15f3968f4f8272c49
Created July 17, 2014 05:06
etcd vs consul vs ???
- What do Etcd, Consul, and Zookeeper do?
- Service Registration:
- Host, port number, and sometimes authentication credentials, protocols, versions
numbers, and/or environment details.
- Service Discovery:
- Ability for client application to query the central registry to learn of service location.
- Consistent and durable general-purpose K/V store across distributed system.
- Some solutions support this better than others.
- Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state.
- Centralized locking can be based on this K/V store.
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active November 10, 2024 03:45
A badass list of frontend development resources I collected over time.
@benders
benders / cisco-asa-config.txt
Last active November 23, 2021 05:01
Getting Amazon VPC up and running with Cisco ASAs can be a pain. This is the config that we used to make it work.
! --------------------------------------------------------------------------------
! This example configuration shows what WE did to get Amazon VPC working with our
! ASAs. We use version 8.3(1). This config has not been reviewed or otherwise
! blessed in any way by anyone at Amazon. YMMV.
!
! It differs from Amazon's supplied config by using two different sets of
! crypto maps and ACLs, so it brings both tunnels up simultaneously.
!
! For the purposes of the example, the physical datacenter network is 172.16.1.0/24
! and the VPC is 10.0.0.0/16.
#!/usr/bin/env ruby
require 'rubygems'
require 'rest-client'
require 'json'
client = RestClient::Resource.new('http://0.0.0.0:3000',
:user => 'admin',
:password => 'changeme',
:headers => { :accept => :json })
class Array
def expand_ranges
self.collect { |wtf| wtf.is_a?(Range) ? wtf.to_a : wtf }.flatten
end
end
[1..15, 19, 21..25].expand_ranges.each { |i| puts i }