Skip to content

Instantly share code, notes, and snippets.

View fabianvf's full-sized avatar

Fabian von Feilitzsch fabianvf

View GitHub Profile
@fabianvf
fabianvf / test.erb
Created April 25, 2016 17:33
How to test erb templates with ruby
<%= conditon ? 'True case' : 'False case' %>)

Genius Loci Notes

Locations

Rest

City: Any

Events:

  • Telephone rings in the dead of night. Answering reveals only static and pops. Sense of a presence is palpable.
  • Automobile is vandalized, tires slashed. Messy smear across windshield, a finger-painting in blood. Resembles many-eyed dragon.
{
"title": "Scrapi",
"services":
{
"query":
{
- hosts: localhost
gather_facts: no
connection: local
tasks:
- k8s_info:
api_version: v1
kind: Project
register: result
- debug: var=result
- k8s_info:
@fabianvf
fabianvf / bakkesmod.log
Created October 1, 2020 19:29
Logs for failed Rocket League DX11 bakkesmod hook
[14:14:24] Creating CVarmanager
[14:14:24] Creating console
[14:14:24] Created console
[14:14:24] Initialized logging
[14:14:24] Running BakkesMod from Sep 29 2020 17:42:26
[14:14:24] Checking steam build ID
[14:14:24] Requesting https://config.bakkesmod.com/static/startupconfig.json
[14:14:25] Incoming json: {"config":{"BakkesMod":true,"RankShowMod":true,"SyncInterval":300.0,"EnableQueueMod":true,"DisregardPlacements":true},"versions":{"110":{"steam":[5244119]}, "119":{"steam":[5524195,5559293]}, "120":{"steam":[5560047]}, "121":{"steam":[5560047]}, "122":{"steam":[5597994]}}, "plugins": {"broken": ["queuedeck"]}}
#!/usr/bin/bash
function setup() {
trap "(echo 'Cleaning up kind cluster' ; set -x ; kind delete cluster ; rm /tmp/kind-test-kubeconfig)" EXIT
make install
make setup-k8s
kind get kubeconfig --name=kind > /tmp/kind-test-kubeconfig
export KUBECONFIG="/tmp/kind-test-kubeconfig"
}
@fabianvf
fabianvf / composable.py
Last active May 20, 2020 15:21
Python function composition with a dot operator
class Composable(object):
''' A function decorator that allows you to use Haskell style dot notation for function composition '''
fns = {}
def __init__(self, fn):
self.fn = fn
Composable.fns[fn.__name__] = fn
def __call__(self, *args, **kwargs):
''' simply calls the function '''
@fabianvf
fabianvf / oreilly_downloader.py
Last active February 26, 2020 13:42
Downloads Oreilly free ebooks by category. Requires requests library and python 2. Categories I've see so far are business, data, iot, security, web-platform, webops-perf, programming, so usage would look like: python oreilly_downloader.py business data iot security web-platform webops-perf programming
import os
import re
import sys
import requests
filename_matcher = re.compile(r'http://www.oreilly.com/(.*)/free/(.*).csp')
def main():
categories = sys.argv[1:]
urls = map(lambda x: 'http://www.oreilly.com/{}/free/'.format(x), categories)
diff --git a/pkg/ansible/controller/controller.go b/pkg/ansible/controller/controller.go
index 02accab2..28bdeb92 100644
--- a/pkg/ansible/controller/controller.go
+++ b/pkg/ansible/controller/controller.go
@@ -28,6 +28,7 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
+ "sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller"
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..361ea2df
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,26 @@
+FROM openshift/origin-release:golang-1.11 AS builder
+COPY . /go/src/github.com/operator-framework/operator-sdk
+RUN cd /go/src/github.com/operator-framework/operator-sdk \
+ && make build/operator-sdk-dev-x86_64-linux-gnu VERSION=dev