Skip to content

Instantly share code, notes, and snippets.

View jeroenvermeulen's full-sized avatar

Jeroen Vermeulen jeroenvermeulen

View GitHub Profile
@wido
wido / ip6-eui64-address.py
Created November 13, 2019 10:41
Calculate RFC482 (SLAAC) IPv6 address a host will obtain
#!/usr/bin/env python3
#
# Calculate the IPv6 address a host will obtain per RFC4862
#
# Usage: ./ip6-eui64-address.py --prefix 2001:db8::/64 52:54:00:59:c2:b3
#
# Author: Wido den Hollander <wido@denhollander.io>
#
import argparse
import ipaddress
@superboum
superboum / LICENCE.txt
Last active April 12, 2024 22:23
Install Debian with Debootstrap + Grub EFI
MIT LICENSE
Copyright 2018 Quentin Dufour
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 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
@dcasati
dcasati / export-kubeconfig-from-aks
Created February 6, 2018 15:30
Export KUBECONFIG from AKS
az aks get-credentials --resource-group k8s-demo-ss --name k8s-demo-cluster-ss --file kubeconfig-ss
@Kovrinic
Kovrinic / .gitconfig
Last active April 11, 2024 11:50
git global url insteadOf setup
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url "git@github.com:"]
insteadOf = git://github
@boseji
boseji / wdt_sleep.ino
Created December 16, 2016 13:37
Arduino Pro Mini Low power Sleep Example
/**
* Arduino Pro Mini Low power Sleep Example
*
* @license BSD Open Source License
* Copyright (c) 2004-2021 Abhijit Bose &lt; salearj [at] hotmail [dot] com &gt;
* If you require a license, see
* http://www.opensource.org/licenses/bsd-license.php
*
* @note
* This example show how to properly enter sleep mode and wake up
@filipenf
filipenf / lndupes.py
Created August 19, 2016 19:04
Reads fdupes(-r1) output and create relative symbolic links for each duplicate
#!/usr/bin/env python
# Reads fdupes(-r -1) output and create relative symbolic links for each duplicate
# usage: fdupes -r1 . | ./lndupes.py
import os
from os.path import dirname, relpath, basename, join
import sys
lines = sys.stdin.readlines()
@thisismitch
thisismitch / haproxy.cfg
Last active November 11, 2023 04:08
Let's Encrypt Auto-Renewal script for HAProxy
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
maxconn 2048
@demagu
demagu / Could-not-restore-untracked-files-from-stash.md
Last active September 8, 2022 17:28
Could not restore untracked files from stash

How to fix 'Could not restore untracked files from stash' issue

Convert a stash to a temporary branch

git stash branch STASHTEMPBRANCH

Apply your stash

git stash apply

@mpchadwick
mpchadwick / Mpchadwick_Missing_Acl_Checker.php
Created July 11, 2015 03:42
Mpchadwick_Missing_Acl_Checker.php
<?php
require_once 'abstract.php';
/**
* Generate a CSV of modules with admin routes that haven't implemented _isAllowed()
*/
class Mpchadwick_Missing_Acl_Checker extends Mage_Shell_Abstract
{
const MODULES_PATH = 'modules';
@z0mbix
z0mbix / tcpdump-es-capture
Created December 19, 2014 14:45
Capture Elasticsearch Queries
# tcpdump -A -nn -s 0 'tcp dst port 9200 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -i lo
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
14:32:33.525122 IP 127.0.0.1.49777 > 127.0.0.1.9200: Flags [P.], seq 313752908:313753888, ack 2465010394, win 257, options [nop,nop,TS val 2684167067 ecr 2684167066], length 980
E...^.@.@............q#...}L...............
..#...#.GET /index/_search HTTP/1.1
Host: 127.0.0.1:9200
Accept: */*
Content-Length: 845
Content-Type: application/x-www-form-urlencoded