Skip to content

Instantly share code, notes, and snippets.


  • Dublin
Block or report user

Report or block ZuZuD

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ZuZuD /
Last active Aug 14, 2019
Simulate an ephemeral port exhaustion on a Linux client.
import socket
import time
import argparse
import subprocess
import shlex
Usage: python3 <dst> <dport> <optional:loop>
Example: python3 80
Help: --help
ZuZuD / tracer-for-ssm.service
Created Jul 4, 2019
systemd_unit to strace amazon-ssm-agent.service
View tracer-for-ssm.service
Description=stracer for SSM
ExecStart=/usr/bin/bash -l -c '/bin/strace -p $(pidof amazon-ssm-agent) > /var/log/strace_ssm_agent.log 2>&1'
ZuZuD /
Last active Jul 28, 2018
TCP states break down with Scappy
from scapy.all import *
import time
import random
def sendit(src=None, dst=None, dport=None):
See the different status of a TCP connection
Was initially written to identify a docker-proxy bug:
I suggest to keep a netstat running from the server side: $ watch -0.1 'netstat -laptn|grep 80'
View gist:aa94ed6ed831b69d85c8e08cec05316b
alias pprint="python -c \"import pprint, sys, json; pprint.pprint(json.loads(''.join([x.strip() for x in sys.stdin.readlines()]))) \""
function cpkodi {
scp $@ root@$kodi_ip:/storage/tvshows
function lskodi {
ssh root@$kodi_ip ls -ltrh /storage/tvshows
function rmkodi {
ssh root@$kodi_ip "cd /storage/tvshows && rm $@"
ZuZuD / gist:68725dd8e2227be0d35e0e3b69798d3a
Last active Mar 27, 2018
ElasticCache auto discovery PHP 7.0 - POC non-consistency getAllKeys() method
View gist:68725dd8e2227be0d35e0e3b69798d3a
function printkv($store) {
if (is_array($store)) {
foreach($store as $item) {
echo "Key: ".$item['key']." Value: ".$item['value']."\n";
ZuZuD / gist:c281df71a79a4a14137c187715988b3d
Created Mar 27, 2018
ElasticCache memcached ( PHP5 auto-discovery getAllKeys() workaround
View gist:c281df71a79a4a14137c187715988b3d
# workaround for bug on getallKeys() on version superior to 1.4.22
function listKeys($srv,$max)
foreach($srv as $node) {
echo "Host: ".$node['host']." Port: ".$node['port']."\n";
$mem = new Memcached();
$mem->addServer($node['host'], $node['port']);
ZuZuD / gist:66decbe330ec560ac8e57e87150891b8
Created Jan 17, 2018
Parse /boot/grub/grub.cfg to help set GRUB_DEFAULT opts in /etc/default/grub
View gist:66decbe330ec560ac8e57e87150891b8
export GRUB_CONFIG=`sudo find /boot -name "grub.cfg"`
awk 'BEGIN {submenu=0;menu=0};$1 ~ /submenu/ {submenu+=1;menu=0;sub(/\$.*$/,"");print submenu" " $0};/menuentry / && /Linux/ {gsub(/menuentry/,"");gsub(/--class.*$/,"");gsub(/\047/,"");print " "submenu">"menu " " $0;menu+=1}' $GRUB_CONFIG
# 1 submenu 'Advanced options for Ubuntu 3.19'
# 1>0 Ubuntu, with Linux 3.19.0-75-generic
# 1>1 Ubuntu, with Linux 3.19.0-75-generic (recovery mode)
# 1>2 Ubuntu, with Linux 3.13.0-139-generic
# 1>3 Ubuntu, with Linux 3.13.0-139-generic (recovery mode)
# 2 submenu 'Advanced options for Ubuntu 4.2'
View userChrome.css
Using the side-bar with Tree tab mode
No sidebar-header */
@namespace url("");
#main-window {
--toolbar-bgcolor: #31363b !important;
ZuZuD / userChrome.css
Last active Oct 3, 2019
userChrome.css tab tree with side-bar auto-hidden + hover and side-bar header removed + resize tab
View userChrome.css
MacOS instructions:
- open about:config and set toolkit.legacyUserProfileCustomizations.stylesheets to True
- mkdir ~/Library/Application Support/Firefox/Profiles/<profile>/chrome/
- copy this file to ~/Library/Application Support/Firefox/Profiles/<profile>/chrome/userChrome.css
Options set:
- Using the side-bar with Tree tab mode
You can’t perform that action at this time.