Skip to content

Instantly share code, notes, and snippets.

View stefanprodan's full-sized avatar
🎯
Hacking on @fluxcd and timoni.sh

Stefan Prodan stefanprodan

🎯
Hacking on @fluxcd and timoni.sh
View GitHub Profile
@stefanprodan
stefanprodan / alert-rules.yaml
Last active January 8, 2020 05:17
prom-alerts
apiVersion: alerting.cloud.weave.works/v1
kind: PrometheusRule
metadata:
name: node-rules
spec:
groups:
- name: node-alerts
rules:
- alert: NodeDown
expr: up{job="kubernetes-nodes"} == 0
@stefanprodan
stefanprodan / caddy-cfg.yaml
Last active February 16, 2024 19:51
Caddy K8s TLS
kind: ConfigMap
apiVersion: v1
metadata:
name: caddy-config
namespace: openfaas
labels:
app: caddy
data:
Caddyfile: |
sub.mydomain.com {

Keybase proof

I hereby claim:

  • I am stefanprodan on github.
  • I am stefanprodan (https://keybase.io/stefanprodan) on keybase.
  • I have a public key ASBAfWbNJNEZd2c_Ysg8rLfwbLtPMHEgDj67cWvUIshY-Ao

To claim this, I am signing this object:

@stefanprodan
stefanprodan / sensu-check-netstat.rb
Created April 29, 2017 14:12
Sensu netstat check with retry/wait capabilities
#! /usr/bin/env ruby
#
# check-netstat
#
# DESCRIPTION:
# Takes an IP and checks for established connections
#
# OUTPUT:
# plain text
#
@stefanprodan
stefanprodan / go-ssh-encrypted-pem.go
Created April 10, 2017 10:37
Using golang ssh client with an encrypted private key
package main
import (
"crypto/x509"
"encoding/pem"
"errors"
"fmt"
"golang.org/x/crypto/ssh"
"io/ioutil"
"net"
@stefanprodan
stefanprodan / get_incidents_csv.py
Created February 28, 2017 07:58 — forked from lfepp/get_incidents_csv.py
Sample script to output all PagerDuty incidents for a given time period to a CSV file (defaults to previous 24 hours)
#!/usr/bin/env python
#
# Copyright (c) 2016, PagerDuty, Inc. <info@pagerduty.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
set -e
sudo true
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" > /etc/apt/sources.list.d/docker.list'
sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-cache policy docker-engine
#!/bin/bash
set -e
GVERSION="1.7"
GFILE="go$GVERSION.linux-amd64.tar.gz"
GOPATH="$HOME/go"
GOROOT="/usr/local/go"
if [ -d $GOROOT ]; then
echo "Installation directories already exist $GOROOT"
@stefanprodan
stefanprodan / Boxstarter.ps1
Last active August 29, 2015 14:27
Boxstarter script for DevLab project.
# NUC workstation setup
# VeriTech Solution @ 2015
# https://veritech.io/
# START http://boxstarter.org/package/nr/url?http://bit.ly/1IMTQcD
# enable reboot
$Boxstarter.RebootOk=$true
$Boxstarter.NoPassword=$false
$Boxstarter.AutoLogin=$true
@stefanprodan
stefanprodan / rethinkdb-ubuntu14.md
Last active August 29, 2015 14:23
RethinkDB Ubuntu Trusty dev cluster setup

Install

source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install rethinkdb

Run as service