Skip to content

Instantly share code, notes, and snippets.

@linuxgemini
linuxgemini / megalovania.rsc
Created February 11, 2019 18:03
RouterOS script to play megalovania
# megalovania first part
# for mikrotik routerboard
# by linuxgemini
#
# challenge started by ave
# bar 1
/beep frequency=293 length=0.14
/delay delay-time=0.14
/beep frequency=293 length=0.122
@qoomon
qoomon / conventional_commit_messages.md
Last active April 24, 2024 10:34
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@marcopaga
marcopaga / lets-encrypt-wildcard-certs-using-azure-dns-on-aks.md
Last active November 2, 2022 09:52
Let's encrypt wildcard TLS certificates for Azure DNS using cert-manager on AKS (Azure Kubernetes Service)

This gist will guide you through the setup of a wildcard Let's encrypt TLS certificate.

Let's encrypt

Let’s encrypt is one of a new kind of Certificate Authority. You can get a TLS certificate from them for your website free of charge and without any manual overhead. These certificates are trusted in most browsers that are out there and will show up as valid. Instead of sending Mails or even paper around you can call an API and prove your domain ownership with simple challenges. Basically you call the API with a hostname or domain name you need a TLS certificate for and you get back a challenge string that you need to put in a well known location on your http host or as a txt record in your dns system.

The little helper for Kubernetes: Cert-Manager

You can find many clients that manage the proces

#!/bin/bash
if [[ $DEBUG == "true" ]]; then
set -x
fi
# Check if FQDN is given
if [ -z "$1" ]; then
echo "Usage: $0 rancher.yourdomain.com"
exit 1
fi
@superseb
superseb / cleanup.sh
Last active June 19, 2023 10:03
Cleanup host added as custom to Rancher 2.0
#!/bin/sh
# OUTDATED: please refer to the link below for the latest version:
# https://github.com/rancherlabs/support-tools/blob/master/extended-rancher-2-cleanup/extended-cleanup-rancher2.sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
@gokhansengun
gokhansengun / Vagrantfile
Created February 21, 2018 19:10
Vagrantfile used in Istanbul Coders - Kubernetes Introduction Meetup
# -*- mode: ruby -*-
# vi: set ft=ruby :
K8S_DEV_BOX_NAME = "gsengun/k8s-dev-box"
K8S_DEV_BOX_VERSION = "17.12.27"
MASTER_NODE_IP_START="172.27.44.20"
WORKER_NODE_IP_START="172.27.44.10"
JOIN_TOKEN="abcdef.1234567890123456"
@danesparza
danesparza / exec.go
Last active June 28, 2023 20:41
Go exec.Command example
package main
import (
"bytes"
"fmt"
"os/exec"
"strings"
)
func main() {
@denji
denji / README.md
Last active April 5, 2024 10:03 — forked from Cubixmeister/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000
@jcushman
jcushman / example.sql
Created February 9, 2017 19:40
Store JSON history with the fast-json-patch library and Postgresql triggers
-- Enable pl/v8:
CREATE EXTENSION plv8;
-- Create json history table:
CREATE TABLE json_history (id BIGSERIAL PRIMARY KEY, tstamp timestamp DEFAULT now(), table_name text, column_name text, target_id bigint, transform json);
-- Create test table:
CREATE TABLE test_json (id BIGSERIAL PRIMARY KEY, data JSON);
-- Enable history tracking on test_json.data:
@cjtallman
cjtallman / README.md
Last active February 24, 2024 01:12
Vagrant Gitlab Server

Vagrant Gitlab Server

Quickly set up a local Gitlab CE server using Vagrant.

Run vagrant up to setup the virtual server.

Server Details

  • Ubuntu 16.04
  • Installs latest Docker