Skip to content

Instantly share code, notes, and snippets.

@madalinignisca
madalinignisca / README.md
Last active June 19, 2024 22:46
Kubernetes 1.25 on Fedora 37 @ Hetzner the right way

Kubernetes 1.25 on Fedora 37 @ Hetzner the right way

Using only kubeadm and helm from Fedora's repository Instructions are for Fedora 37+ only, using distribution's repository for installing Kubernetes.

Note: avoid kubernetes and kubernetes-master as there are deprecated and setup is more complex.

Note: I have not yet tinkered using ipv6, but it is in my plans to do it.

The result should be a decent Kubernetes cluster, with Cloud Control Manager installed and controlling layer 2 private networking allowing pods to talk at fastest speed possible. Will default to Hetzner's cloud volumes.

@chris-belcher
chris-belcher / work-diary.md
Last active October 4, 2023 16:53
Chris Belcher work diary
@robskillington
robskillington / prometheus.proto
Last active June 15, 2024 12:14
Example Python Prometheus remote write client
// Copyright 2016 Prometheus Team
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@mraaroncruz
mraaroncruz / steps.md
Last active July 9, 2024 03:13
Get the Telegram channel ID

To get the channel id

  1. Create your bot with botfather
  2. Make you bot an admin of your channel

Simplest way (via @anhtuank7c)

Go to Telegram web and open a channel, get the ID from -[channel id] from hash in the path

https://web.telegram.org/k/#-9999999999999

@hakib
hakib / custom_django_checks.py
Last active July 1, 2024 09:20
Custom django checks using Django check framework, inspect and ast.
"""
Custom django checks.
H001: Field has no verbose name.
H002: Verbose name should use gettext.
H003: Words in verbose name must be all upper case or all lower case.
H004: Help text should use gettext.
H005: Model must define class Meta.
H006: Model has no verbose name.
H007: Model has no verbose name plural.

A description of known problems in Satoshi Nakamoto's paper, "Bitcoin: A Peer-to-Peer Electronic Cash System", as well as notes on terminology changes and how Bitcoin's implementation differs from that described in the paper.

Abstract

The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power.

@mplewis
mplewis / safe_schedule.py
Last active April 23, 2024 01:12
An implementation of Scheduler that catches jobs that fail. For use with https://github.com/dbader/schedule
import logging
from traceback import format_exc
import datetime
from schedule import Scheduler
logger = logging.getLogger('schedule')
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 22, 2024 18:26
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k