Skip to content

Instantly share code, notes, and snippets.

@0x00dec0de
0x00dec0de / tunnel.go
Created November 24, 2023 18:59 — forked from felix021/tunnel.go
A fast secure tunnel written in Golang
package main
import (
"crypto/md5"
"crypto/rand"
"errors"
"flag"
"fmt"
"io"
"net"
@0x00dec0de
0x00dec0de / gist:1eb2bf8ced5f37be449c2e67cbc07d7f
Created October 16, 2023 12:28 — forked from riverans/gist:3b61ed80ef6cd74a6af944b771eb39bf
Exim DMARC with configuration to send DMARC reports (but not forensic reports)
1) Exim config
a. Global settings:
dmarc_history_file = /var/spool/exim/dmarc_history.txt
dmarc_tld_file = /etc/exim/opendmarc.tlds
b. Get the tld file (list of valid TLD's) from http://publicsuffix.org/list/
c. Somewhere early in the RCPT ACL I have:
.include_if_exists /etc/exim/dmarc_acl_control.conf
@0x00dec0de
0x00dec0de / create-user.sh
Created May 21, 2023 14:36 — forked from etiennetremel/create-user.sh
Create Kubernetes user using kubectl csr and cfssl
#!/bin/bash
#
# Create Kubernetes user. Require cfssl.
#
# Usage:
# ./create-user.sh <kubernetes api host> <fulle name> <clusterrole>
#
# Example:
# ./create-user.sh k8s-api.my-domain.com "Jane Doe" my-project:admin
@0x00dec0de
0x00dec0de / 100_base.conf
Created April 21, 2023 12:48 — forked from danackerson/100_base.conf
using nginx + lua + redis for redirects and rewrites
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua
http {
lua_package_path "/etc/nginx/include.d/?.lua;;";
lua_socket_pool_size 100;
lua_socket_connect_timeout 10ms;
lua_socket_read_timeout 10ms;
server {
@0x00dec0de
0x00dec0de / tts.py
Created February 25, 2023 17:46 — forked from sainak/tts.py
tts using google gstatic dictionary
#!/usr/bin/env python3
# ./tts.py hello world
import requests, string, os
from playsound import playsound
from sys import argv
text = (
" ".join(argv[1:]).lower().translate(str.maketrans("", "", string.punctuation)).split(" ")
)
@0x00dec0de
0x00dec0de / maintenance-page.yaml
Created February 15, 2023 20:15 — forked from sidpalas/maintenance-page.yaml
Kubernetes temporary maintenance page
apiVersion: v1
kind: ConfigMap
metadata:
name: maintenance-page
data:
maintenance.html: |-
<!--HTML GOES HERE-->
<!doctype html>
<title>Site Maintenance</title>
<link rel="stylesheet" href="maintenance.css">
@0x00dec0de
0x00dec0de / gist:0ed5d6a44ab7effcea9a2d863ca53d2d
Created November 16, 2022 14:01 — forked from RichiH/gist:f2ffb824d428d8ca0c7c40cd62022b56
Prometheus relabelling to get rid of port number
============================================
============================================
============================================
This does what it should:
regex: (.+?)(:80)?
Also see https://golang.org/pkg/regexp/syntax/
@0x00dec0de
0x00dec0de / starship.toml
Created November 1, 2022 13:38 — forked from pythoninthegrass/starship.toml
Starship prompt setup
# SOURCE: https://starship.rs/config
# DEBUG via: `starship explain`
# Timeout for commands executed by starship (ms)
command_timeout = 2000
# Replace the "❯"
[character]
success_symbol = "[λ](green)"
@0x00dec0de
0x00dec0de / docker-compose.yml
Created October 19, 2022 21:32 — forked from cspinetta/docker-compose.yml
Promtail example extracting data from json log
version: "3.6"
services:
promtail:
image: grafana/promtail:1.4.0
container_name: promtail
command: [ "-config.file=/etc/promtail/local-config.yaml" ]
volumes:
- './promtail.yml:/etc/promtail/local-config.yaml:ro'
- '__path_to_logs_directory__:/app/log:ro'
@0x00dec0de
0x00dec0de / delete_git_submodule.md
Created August 24, 2022 07:44 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule