Skip to content

Instantly share code, notes, and snippets.

View samueljon's full-sized avatar

Samúel Jón Gunnarsson samueljon

View GitHub Profile
@f41gh7
f41gh7 / api-server.yaml
Last active August 21, 2023 10:31
vm operator configuration examples
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
metadata:
name: apiserver
namespace: monitoring-system
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
bearerTokenSecret:
key: ""
@mtrimarchi
mtrimarchi / 6to4.rsc
Created May 30, 2020 23:08
Working 6rd/6to4 script for modems without native IPV6 in firmware operating on native IPV6 network - https://forum.mikrotik.com/viewtopic.php?t=134621
# 6to4.rsc
# Notes
# We cannot use variables here, somehow the router rejects them.
/interface 6to4
# The first value to replace here is your WAN IPv4 address (the one you get when you type "my ip" in google search
# The second value is the one called "IPv4 Relay" in the calculator.
add clamp-tcp-mss=yes disabled=no dont-fragment=no dscp=inherit local-address=<WAN_IP_HERE> mtu=1480 name=6rd remote-address=<IPV4_RELAY_ADDRESS_HERE>
# "IPv6 6RD Adress"
@GavinRay97
GavinRay97 / index.md
Last active April 12, 2024 18:31
Hasura organization permissions

Introduction

This document outlines how to model a common organization-based permission system in Hasura. Let's assume that you have some table structure like the following:

Table Name Columns Foreign Keys
User id, name, email
Organization User id, user_id, organization_id user_id -> user.id, organization_id -> organization.id
Organization id, name
@geerlingguy
geerlingguy / molecule-3-up.sh
Last active January 15, 2021 13:52
Molecule 3.0 update script with all the little changes I had to make.
#!/bin/bash
#
# Update things to be compatible with Molecule 3.0.
#
# This script is NOT idempotent, and should never be run again.
exit 1
export LINT_STRING="lint: |
set -e
yamllint .
@olafz
olafz / tweak_6rd.rsc
Created January 8, 2020 19:37
Tweak IPv6 mikrotik RouterOS (6RD)
# Dutch ISP Tweak offers IPv6 via 6rd. The commands below configure a mikrotik
# RouterOS with 6rd. This was tested with RouterOS 6.46.1.
#
# First, you'll have to request IPv6 information from Tweak. You'll receive
# a fixed IPv4 address and some other information. For the rest of this guide,
# I assume the following information is received from Tweak:
#
# ===
# IPv4 address: 185.227.123.123
# IPv4 mask length: 22
@Mau5Machine
Mau5Machine / docker-compose.yml
Last active July 4, 2024 16:57
Traefik Configuration and Setup
version: "3.3"
services:
################################################
#### Traefik Proxy Setup #####
###############################################
traefik:
image: traefik:v2.0
restart: always
# Pollenvarsel for Home Assistant - Oppdatert 29.04.2021 grunnet endret URL/struktur hos Pollenkontroll.no
- platform: rest
name: pollen_json
resource: https://pollenkontroll.no/api/middleware/pollen/b5bb4856-2117-433d-bf18-53504ef2f101
scan_interval: 21600
value_template: 'OK'
json_attributes:
- "forecast"
@hhromic
hhromic / tradfri.sh
Last active April 16, 2023 21:06
Show information about IKEA Tradfri devices firmware from the official IKEA servers in Linux
#!/usr/bin/env bash
# Show information about IKEA Tradfri devices firmware from the official IKEA servers
# script by github.com/hhromic
# optional filter
declare -r FILTER=$1
# URLs for firmware channels
declare -r -A CHANNEL_URLS=(
[CURRENT]=http://fw.ota.homesmart.ikea.net/feed/version_info.json
@smola
smola / GLUSTER_SETUP.sh
Created October 18, 2018 09:24
Quick and dirty single-node GlusterFS setup
#
# Instructions for quick gluster server (1 node) setup with a volume on LVM.
# No replication, just using localhost.
#
# See https://docs.gluster.org/en/latest/Administrator%20Guide/Brick%20Naming%20Conventions/
#
# Install GlusterFS
add-apt-repository ppa:gluster/glusterfs-4.0
apt-get install glusterfs-server