Skip to content

Instantly share code, notes, and snippets.

@tehmaze
tehmaze / printer.cfg
Created February 28, 2022 11:08
FLSUN SR Klipper config
# This file contains common pin mappings for the BIGTREETECH SKR V1.3 board used
# in the FLSUN SuperRacer. To use this config, the firmware should be compiled
# for the LPC1768.
[mcu]
# SKR 1.3 for stepper E+sensors+heaters
serial:
[mcu:abc]
# Supernova for steppers A,B,C
@Neo23x0
Neo23x0 / log4j_rce_detection.md
Last active January 28, 2024 08:19
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log
@eizedev
eizedev / vaultwarden.conf
Last active July 6, 2023 14:59
vaultwarden (bitwarden) nginx configuration on synology NAS (DSM 7 compatible) using synology docker (Supporting bitwardens LiveSync with Websocket configuration)
server {
listen 4444 ssl http2;
listen [::]:4444 ssl http2;
server_name CHANGE_SERVERNAME;
ssl_certificate /usr/syno/etc/certificate/system/default/ECC-fullchain.pem;
ssl_certificate_key /usr/syno/etc/certificate/system/default/ECC-privkey.pem;
ssl_trusted_certificate /usr/syno/etc/certificate/system/default/ECC-fullchain.pem;
add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload" always;
@gabrielsson
gabrielsson / minecraft-on-raspberry-pi.md
Last active April 12, 2024 15:49
Minecraft on Raspberry Pi cluster with metrics

alt

Minecraft on Raspberry Pi cluster with metrics

Ever wanted to put your Rapsberry Pi cluster to great use? Our team is working remotely, so we started to play Minecraft. I decided I would host the Minecraft server on my Raspberry Pi cluster. This gist will guide you through the steps I took to get a k3s cluster up with k3sup and later installed Minecraft as well as metrics exporter and Prometheus Operator

Why?

Quoniam Possumus - Because we can

You'll need

api:
dashboard: true
debug: true
entryPoints:
http:
address: ":80"
https:
address: ":443"
@pamolloy
pamolloy / README.md
Last active January 23, 2024 07:28
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.

cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
@jonico
jonico / Jenkinsfile
Last active January 31, 2024 09:43
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8
@JonasGroeger
JonasGroeger / sync-projects
Last active November 4, 2023 13:10
Gitlab: Clone / Pull all projects in a group
#!/usr/bin/env bash
# Documentation
# https://docs.gitlab.com/ce/api/projects.html#list-projects
NAMESPACE="YOUR_NAMESPACE"
BASE_PATH="https://gitlab.example.com/"
PROJECT_SEARCH_PARAM=""
PROJECT_SELECTION="select(.namespace.name == \"$NAMESPACE\")"
PROJECT_PROJECTION="{ "path": .path, "git": .ssh_url_to_repo }"
@kspeeckaert
kspeeckaert / Quiver_HTML_importer.py
Created May 5, 2016 13:35
Quiver HTML importer
import json
import uuid
from pathlib import Path
from urllib.parse import urlparse
from datetime import datetime
import html2text
import requests
from bs4 import BeautifulSoup
@kalimar
kalimar / gist:1a23222b59fd0208f88d
Last active March 14, 2016 11:51
Ruby Retro 2016