Skip to content

Instantly share code, notes, and snippets.

# HOST
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable-wireguard.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable
apt update
apt install wireguard pve-headers
echo "wireguard" >> /etc/modules-load.d/modules.conf
# Container
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable-wireguard.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable
@svet-b
svet-b / bigdashboard_output.pdf
Last active June 13, 2024 08:43
PDF export of Grafana dashboard using puppeteer
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

OpenSSL Playground

Certificates

# human readable crt file
openssl x509 -in stackexchangecom.crt -text -noout

# human readable pem file
openssl x509 -in cert.pem -text -noout
@fkorotkov
fkorotkov / chamber.sh
Last active June 8, 2021 11:52
Script to run a command in an isolation
#!/usr/bin/env bash
set -e
# list of Nix packages to install
NIX_PACKAGES="darwin.shell_cmds"
XCODE_DERIVED_DATA="$HOME/Library/Developer/Xcode/DerivedData"
WORKING_DIRECTORY=$PWD
@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active September 28, 2023 14:54
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

@rambolee
rambolee / update-dnsmasq-from-gfwlist.py
Last active May 2, 2024 01:27
升级 小米路由器3 可以ssh 可以 Shadowsocks [Tags]: 小米路由, 小米路由3, 小米路由器, 小米路由器3, ssh, shadowsocks
#!/usr/bin/env python
#coding=utf-8
#
# Generate a list of dnsmasq rules with ipset for gfwlist
#
# Copyright (C) 2014 http://www.shuyz.com
# Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules
import urllib2
import re
@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@jim3ma
jim3ma / http_proxy.go
Created January 25, 2017 02:11
Register Dialer Type for HTTP&HTTPS Proxy in golang
package main
import (
"bufio"
"fmt"
"net"
"net/http"
"net/url"
"crypto/tls"
@bwann
bwann / README.md
Last active June 22, 2024 20:20
Tunnelling SSH over SSL/TLS

How to tunnel SSH over SSL/TLS

laptop ssh -> laptop stunnel -> evil network -> internet -> your server -> your server ssh

Server (your shell server/home box/work box/whatever)

Sets up a stunnel process listening externally on port 2443/tcp, forwards to localhost 22/tcp

  • Install stunnel, e.g. yum install stunnel
  • Install server config snippet to /etc/stunnel/stunnel.conf
@fijimunkii
fijimunkii / elasticdump_all_indices.sh
Created December 2, 2016 23:30
elasticdump all indices
INPUT=$1
DEST=$2
indices=$(curl -s -XGET $INPUT/_cat/indices?h=i)
for INDEX in $indices
do
elasticdump --input=$INPUT/$INDEX --output=$DEST/$INDEX --type=data
done