Skip to content

Instantly share code, notes, and snippets.

View KrustyHack's full-sized avatar
💭
┬─┬ ノ( ゜-゜ノ)

Nicolas Hug KrustyHack

💭
┬─┬ ノ( ゜-゜ノ)
View GitHub Profile
@KrustyHack
KrustyHack / proxies_check.py
Created March 22, 2017 16:28
Simple Proxies Checking with Python
import requests, random
from termcolor import colored
from multiprocessing.dummy import Pool as ThreadPool
def get(proxy):
#print('Trying %s' % proxy)
try:
proxies = {
'http': 'http://%s' % (proxy) ,
'https': 'http://%s' % (proxy),
#!/bin/bash
DEVICE_ID="$1"
MNT_DIR="$2"
if [[ "$DEVICE_ID" == "" || "$MNT_DIR" == "" ]]; then echo "Usage: ./gce-new-disk.sh DEVICE_ID MNT_DIR"; exit 1; fi
sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/$DEVICE_ID
sudo mkdir -p $MNT_DIR
sudo mount -o discard,defaults /dev/$DEVICE_ID $MNT_DIR
@KrustyHack
KrustyHack / configure-mailgun
Created August 4, 2017 15:46 — forked from jgeewax/configure-mailgun
Script to configure Postfix for Mailgun
#!/bin/bash
# Configuration for the script
POSTFIX_CONFIG=/etc/postfix/main.cf
POSTFIX_SASL=/etc/postfix/sasl_passwd
function confirm () {
read -r -p "${1:-Are you sure? [Y/n]} " response
if [[ $response == "" || $response == "y" || $response == "Y" ]]; then
echo 0;
@KrustyHack
KrustyHack / tmux-cheatsheet.markdown
Created October 24, 2017 09:25 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@KrustyHack
KrustyHack / wgk.txt
Last active April 7, 2025 17:58
Windows Generic Keys
Windows Edition Product Key
Windows 7 Starter 7Q28W-FT9PC-CMMYT-WHMY2-89M6G
Windows 7 Home Basic YGFVB-QTFXQ-3H233-PTWTJ-YRYRV
Windows 7 Home Premium RHPQ2-RMFJH-74XYM-BH4JX-XM76F
Windows 7 Professional HYF8J-CVRMY-CM74G-RPHKF-PW487
Windows 7 Ultimate D4F6K-QK3RD-TMVMJ-BBMRX-3MBMV
Windows 7 Enterprise H7X92-3VPBB-Q799D-Y6JJ3-86WC6
Windows 7 Starter N D4C3G-38HGY-HGQCV-QCWR8-97FFR
Windows 7 Home Basic N MD83G-H98CG-DXPYQ-Q8GCR-HM8X2
@KrustyHack
KrustyHack / doc.adoc
Last active September 19, 2024 16:37
proxmox-ubuntu-cloud-howto

Cloud-Init Support

Cloud-Init is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, one can configure network

@KrustyHack
KrustyHack / howto.md
Last active October 22, 2023 19:38
Proxmox NAT

Forwarding

iptables -t filter -A FORWARD -o vmbr0 -j ACCEPT
iptables -t filter -A FORWARD -i vmbr0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o vmbr0 -j MASQUERADE

Remote Control (Windows)

@KrustyHack
KrustyHack / readme.md
Created July 9, 2018 07:46
Proxmox Cloud VM

[[qm_cloud_init]] Cloud-Init Support

ifdef::wiki[] :pve-toplevel: endif::wiki[]

http://cloudinit.readthedocs.io[Cloud-Init] is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, configuration of network

@KrustyHack
KrustyHack / signature.html
Last active October 15, 2018 09:32
Email signature
<table width="276" cellspacing="0" cellpadding="0" border="0"> <tr> <td style="text-align:left;padding-bottom:10px"><a style="display:inline-block" href="https://www.blackcreeper.com"><img style="border:none" width="200" src="https://s1g.s3.amazonaws.com/46ae128cfd420103e7481d2ac40d8882.png"></a></td> </tr> <tr> <td style="border-top:solid #000000 2px" height="12"></td> </tr> <tr> <td style="vertical-align: top; text-align:left;color:#000000;font-size:10px;font-family:helvetica, arial;; text-align:left"> <span><b><span style="color:#000000;font-size:12px;font-family:helvetica, arial">Nicolas Hug</span></b><br> <span style="color:#000000;font-size:10px;font-family:helvetica, arial">Manager</span></span> <br><br> <table cellspacing="0" cellpadding="0" border="0" width="100%" style="margin:10px 0"><tr><td width="50%" style="vertical-align:top;padding-right:10px;font:10px helvetica, arial"> <table cellspacing="0" cellpadding="0" border="0" style="margin:0 5px 5px 0"><tr><td style="padding-right:5px"><img width="2
ip link add link enp2s0 name enp2s0.4000 type vlan id 4000
ip link set enp2s0.4000 mtu 1400
ip link set dev enp2s0.4000 up
ip addr add 192.168.100.1/24 brd 192.168.100.255 dev enp2s0.4000
auto enp2s0.4000
iface enp2s0.4000 inet static
address 192.168.100.1
netmask 255.255.255.0