Skip to content

Instantly share code, notes, and snippets.

Avatar
🏝️
Living the dream

Jeffrey Clark h0tw1r3

🏝️
Living the dream
View GitHub Profile
@cerebrate
cerebrate / README.md
Last active Oct 9, 2021
Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.
View README.md

NOTE

See https://gist.github.com/cerebrate/d40c89d3fa89594e1b1538b2ce9d2720#gistcomment-3563688 below before doing anything else.

Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.

Yes, I've done this, and yes, it works. It is, however, entirely unsupported and assembled through reasonable guesswork, so if you try this and it explodes your computer, brain, career, relationships, or anything else, you agree that you take sole responsibility for doing it, that I never claimed it was a good idea, and that you didn't get these instructions from me .

View PVE-Multipath.md

Installing multipath tools on PVE Cluster with shared storage

This cheatsheet shows how to install and configure multipath tools on Proxmox PVE Cluster where multiple nodes share single storage with multipath configuration, for example SAN storage connected to each of the nodes by two independent paths.

Proxmox PVE version

This cheatsheet has been tested on Proxmox 5.x.

Note about sudo

I do not prepend sudo command to any of commands listed here, but keep in mind that nearly all commands requires su privileges, so use sudo if your account happen to not have root access.

@f0ster
f0ster / slack_history.py
Last active Nov 8, 2019
slack history downloader (pub and priv) with rate limit retry :)
View slack_history.py
#https://gist.github.com/Chandler/fb7a070f52883849de35 SEE HERE
# MIT License
# Copyright (c) 2016 Chandler Abraham
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@LiamHaworth
LiamHaworth / notifyAddrChange.go
Created Jun 22, 2017
A simple go program leveraging the Window API to listen for IPv4 network address change events
View notifyAddrChange.go
package main
import (
"log"
"syscall"
"unsafe"
"golang.org/x/sys/windows"
)
@dalenoe
dalenoe / unifi_ssl_import.sh
Last active Oct 14, 2018 — forked from stevejenkins/unifi_ssl_import.sh
Import and use SSL certificates (including Let's Encrypt) with the Ubiquiti UniFi Controller on Unix/Linux Systems
View unifi_ssl_import.sh
#!/usr/bin/env bash
# unifi_ssl_import.sh
# UniFi Controller SSL Certificate Import Script for Unix/Linux Systems
# by Steve Jenkins <http://www.stevejenkins.com/>
# Incorporates ideas from https://source.sosdg.org/brielle/lets-encrypt-scripts
# Version 2.2
# Last Updated June 26, 2016
@samhocevar
samhocevar / gist:00eec26d9e9988d080ac
Last active Aug 18, 2021
Configure sshd on MSYS2 and run it as a Windows service
View gist:00eec26d9e9988d080ac
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <sam@hocevar.net>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights
#
@berlincount
berlincount / http-server.py
Last active Jul 20, 2020
Twisted HTTP server example
View http-server.py
#!/usr/bin/env python
from twisted.web import server, resource
from twisted.internet import reactor, defer
from pprint import pprint
import base64
class DummyServer(resource.Resource):
isLeaf = True
@andrewkroh
andrewkroh / fstab.pp
Created Aug 9, 2014
Configuring /etc/fstab with Puppet Augeas
View fstab.pp
augeas{ '/etc/fstab - nosuid on /sys':
context => "/files/etc/fstab",
changes => [
"ins opt after /files/etc/fstab/*[file = '/sys']/opt[last()]",
"set *[file = '/sys']/opt[last()] nosuid",
],
onlyif => "match *[file = '/sys']/opt[. = 'nosuid'] size == 0",
}
augeas{ '/etc/fstab - acl on /sys':
@ebirn
ebirn / runkexec
Last active Nov 15, 2017
kexec latest kernel on Centos 6
View runkexec
#!/bin/sh
VERSION=$(ls -t1 /boot/vmlinuz-* | cut -f 1 -d '-' --complement | head -1)
BOOT=/boot
KEXEC=/sbin/kexec
KERNEL=$BOOT/vmlinuz-$VERSION
INITRD=$BOOT/initramfs-$VERSION.img
@aputs
aputs / replace-centos6x-iptables
Last active Sep 6, 2019
replace centos 6.x iptables
View replace-centos6x-iptables
# compile iptables from source and install to /usr/local
mkdir -p /tmp/iptables
wget "http://www.netfilter.org/projects/iptables/files/iptables-1.4.21.tar.bz2" -qO- | tar --strip-components=1 -C /tmp/iptables -xvj
cd /tmp/iptables
./configure
make
make install
# set alternatives
sudo alternatives --install /sbin/iptables iptables.x86_64 /usr/local/sbin/iptables 100 \