Skip to content

Instantly share code, notes, and snippets.

View jforge's full-sized avatar

jforge

  • Germany, Bargteheide
  • 08:44 (UTC +01:00)
View GitHub Profile
@jforge
jforge / mc.say.hello
Last active February 2, 2025 18:49
Minecraft commands
say hello
@jforge
jforge / nexus-npm-cache-revalidate.sh
Created December 11, 2024 20:18 — forked from WoozyMasta/nexus-npm-cache-revalidate.sh
Script for rebuild indexes and invalidate cache in Sonatype nexus 3 NPM proxy repositories
#!/usr/bin/env bash
#
# Script for rebuild indexes and invalidate cache in NPM proxy repositories.
# Configuration can load from hide file with same name as script
# Example: this-srcipt.sh load config from ./.this-srcipt
#
# Copyright 2020 WoozyMasta <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
(Verse 1)
I got a sea of tabs, they're piling high,
Each one a doorway, a rabbit hole to try.
Work and leisure, tangled mess of dreams,
From coding scripts to random food memes.
(Pre-Chorus)
Clicking through windows, I can’t see the end,
Forgotten research, and texts I should send.
Chrome's overheating, computer's on fire,
(* Follower Control Algorithm
This function implements a control algorithm for a follower system,
possibly used in robotics or autonomous vehicles. *)
let node follower_control (
leader_position: float,
leader_velocity: float,
follower_position: float,
follower_velocity: float
):
@jforge
jforge / gist:5ccf7b0ea13b8b0bd8b0e663bd41b70d
Created July 21, 2024 17:09 — forked from wrouesnel/gist:6240468b75c6d72053ed
Updating system SSL and java keystore in a docker build
# Compile and install certificates for the Java trust keystore
# and main keystore. Let's face it, this is everyone's keystore password.
# Note I install java very flatly normally.
COPY trust-certs/ /usr/local/share/ca-certificates/
RUN update-ca-certificates && \
ls -1 /usr/local/share/ca-certificates | while read cert; do \
openssl x509 -outform der -in /usr/local/share/ca-certificates/$cert -out $cert.der; \
/java/bin/keytool -import -alias $cert -keystore /java/jre/lib/security/cacerts -trustcacerts -file $cert.der -storepass changeit -noprompt; \
rm $cert.der; \
done
@jforge
jforge / jwt-decode.sh
Created June 12, 2024 11:30 — forked from angelo-v/jwt-decode.sh
Decode a JWT via command line
# will not work in all cases, see https://gist.github.com/angelo-v/e0208a18d455e2e6ea3c40ad637aac53#gistcomment-3439904
function jwt-decode() {
sed 's/\./\n/g' <<< $(cut -d. -f1,2 <<< $1) | base64 --decode | jq
}
JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
jwt-decode $JWT
@jforge
jforge / iperf-multicasting
Last active June 11, 2024 09:30 — forked from jayjanssen/gist:5697813
Testing multicast with iperf
this is a sample of output:
root@percona-db-2:~# iperf -s -u -B 226.94.1.1 -i 1
------------------------------------------------------------
Server listening on UDP port 5001
Binding to local address 226.94.1.1
Joining multicast group 226.94.1.1
Receiving 1470 byte datagrams
UDP buffer size: 122 KByte (default)
------------------------------------------------------------
@jforge
jforge / reset-pi-passwd.md
Created May 6, 2024 11:58 — forked from jlollis/reset-pi-passwd.md
Reset Forgotten Raspberry Password

Reset Forgotten Raspberry Pi Password

Remove SD Card

The first step is to turn off the Raspberry so you can remove the memory card without worry.

If the Raspberry Pi is not connected to a screen, the only way to turn it off is to unplug it. Otherwise, you can go through the GUI to turn it off properly, via the menu, before unplugging it.

Once the Raspberry Pi is turned off, you can insert the card into your computer and go to the next step.

@jforge
jforge / Meteo.py Example
Created November 12, 2023 14:38 — forked from ChristianTremblay/Meteo.py Example
Example of using BAC0 to create a BACnet device. (Meteo parser not included)
import atoma, requests
import BAC0
import re
from meteo_parser import MeteoGC
from bacpypes.basetypes import EngineeringUnits, DateTime
from bacpypes.primitivedata import CharacterString, Date, Time
from BAC0.core.devices.create_objects import (
create_AV,
@jforge
jforge / ForkMITLicensedProject.md
Created November 10, 2023 06:56 — forked from fbaierl/ForkMITLicensedProject.md
HOWTO fork a MIT licensed project

No, you are not allowed to change the copyright notice. Indeed, the license text states pretty clearly:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

But you are allowed to add a copyright notice.

If you want to keep the MIT license, which is what I would advise you to do, you only need to add a single line to the license file, before or after Copyright (c) 2012 Some Name with your own copyright notice. The final LICENSE file will look like this:

The MIT License (MIT)