Skip to content

Instantly share code, notes, and snippets.

@djboris9
djboris9 / isvim.sh
Created January 3, 2020 11:58
Checks if there is a vim open inside the same shell
#!/bin/bash
function isvim {
if (pgrep -t $(tty | sed 's/\/dev\///g') vim >/dev/null) ; then echo "yes"; else echo "no"; fi
}
@djboris9
djboris9 / main_test.go
Created March 26, 2021 14:06
Go AST "if err != nil" rewriter
package main
import (
"errors"
"testing"
)
func ThisMightReturnError() error {
return errors.New("I'm an error")
}
apiVersion: argoproj.io/v1alpha1
kind: EventSource
metadata:
name: gitlab
spec:
service:
ports:
- port: 12000
targetPort: 12000
gitlab:
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: mr-deploy
spec:
dependencies:
- name: mr-open
eventSourceName: gitlab
eventName: microfast
filters:
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: mr-undeploy
spec:
dependencies:
- name: mr-close
eventSourceName: gitlab
eventName: microfast
filters:
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: preview
spec:
ingressClassName: nginx
rules:
- host: preview-{{ .Values.MR }}.example.com
...

CLA Individual

Contributor Agreement

Individual Contributor Non-Exclusive License Agreement

(including the Traditional Patent License OPTION)

Thank you for your interest in contributing to microfast GmbH's rea ("We" or "Us").

The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us. To make this document effective, please follow the instructions at https://github.com/microfast-ch/rea/blob/main/CONTRIBUTING.md.