Skip to content

Instantly share code, notes, and snippets.

@lawrenceching
lawrenceching / install-frp-as-systemd-service.sh
Last active March 4, 2025 15:38
Install frp as systemd service
#!/bin/bash
# Update on 2024/05/29
# 1. use wget to fetch latest frp version when curl was not installed
# 2. Remind users that frp will be run in non-root user
# 3. Add CI
#
# Update on 2024/04/13
# 1. Improved OS compatibility: try wget and then curl for downloading files.
#
# Update on 2024/01/26
@kincl
kincl / puppet_cert
Last active March 4, 2025 15:37
Uses puppet certificate API to list, sign, revoke certificates
#!/bin/env python#!/bin/env python
# https://github.com/puppetlabs/puppet/blob/stable/api/docs/http_certificate_status.md
import os
import sys
import json
import requests
import argparse
import subprocess
@tsoe77
tsoe77 / json2hcl.py
Created March 4, 2025 15:30
A python script to convert JSON to HCL
#!/usr/bin/env python3
# json2hcl.py - Convert JSON to Terraform HCL
import json
import sys
import re
import argparse
from typing import Any, Dict, List, Union
@ksafranski
ksafranski / Common-Currency.json
Last active March 4, 2025 15:35
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@tempcarbimezx46
tempcarbimezx46 / Cisco Packet Tracer Keygen
Created October 2, 2024 14:12
Cisco Packet Tracer 8.4.4 Crack with License Key [Latest 2024]
Cisco Packet Tracer License Key
@MatrixManAtYrService
MatrixManAtYrService / Dockerfile
Last active March 4, 2025 15:34
tini vs dumb init
FROM ubuntu
RUN apt update
RUN apt install -y tini dumb-init python3-pip
RUN pip install apache-airflow
# place the entrypoint script
COPY entrypoint.sh /entrypoint
RUN chmod +x /entrypoint
# a script that calls airflow (and does test-relevant things too)
@mattmc3
mattmc3 / split.zsh.md
Last active March 4, 2025 15:33
ZSH - split string into array

There are a ton of different ways to split up a string in Zsh. This gist attempts to show them with examples to help you build your own. I write Zsh scripts all the time, and still reference back to this gist, so there you go.

From the Zsh docs on Parameter Expansion Flags (yeah - I know... how would anyone ever find that if they didn't know where to look!?)

j:string: Join the words of arrays together using string as a separator.
s:string: Force field splitting at the separator string.

You can also read more by running man zshexpn. (Again, I know, right!? How would anyone know to look there!?)

@nonamed01
nonamed01 / fuckForticlient.sh
Last active March 4, 2025 15:32
fuckForticlient, a command-line client to connect to SAML fortivpn servers by using openfortivpn and the --cookie-in-stdin parameter
#!/bin/bash
# Uncomment the following line to debug the script:
#set -x
#####################################################################################
# fuckForticlient.sh
#
# Script to authenticate against Fortinet SAML servers using Firefox and
# openfortivpn. This replaces Forticlient for GNU/Linux completely.
# Because openfortivpn does not support SAML login (yet), this script uses Firefox
# to authenticate, grabs SVPNCOOKIE and then calls openfortivpn to setup
@linucksrox
linucksrox / docker-compose.yml
Created November 21, 2023 18:49
Unifi Network Application 8.0.7 with mongodb - docker-compose.yml
version: '3.7'
services:
unifi-db:
image: docker.io/mongo:latest
container_name: unifi-db
volumes:
- ./data:/data/db
- ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
@mattisz
mattisz / ipmi-updater.py
Last active March 4, 2025 15:29 — forked from dekimsey/ipmi-updater.py
Supermicro IPMI certificate updater
#!/usr/bin/env python3
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python
# This file is part of Supermicro IPMI certificate updater.
# Supermicro IPMI certificate updater is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT