Skip to content

Instantly share code, notes, and snippets.

@clickinfinite
clickinfinite / 01-network-manager-all.dhcp.yml
Created January 23, 2021 10:30 — forked from dimMaryanto93/01-network-manager-all.dhcp.yml
network settings for ubuntu 18.04 server with wifi and ethernet
network:
version: 2
renderer: networkd
ethernets:
enp3s0:
dhcp4: yes
dhcp6: no
optional: false
@clickinfinite
clickinfinite / ipset_update.sh
Created June 22, 2019 09:33 — forked from porjo/ipset_update.sh
Create Geo fencing country blocks for use by iptables
#!/bin/bash
#
# Update the ipset that iptables references for allowing/blocking based on country.
# Takes 2 parameters: ipset name (no spaces), country name e.g. 'Australia'
#
# iptables should have an existing '--match-set' rule e.g
# $ iptables -I INPUT -p tcp --dport 22 -m set --match-set australia4 src -j ACCEPT
# $ ip6tables -I INPUT -p tcp --dport 22 -m set --match-set australia6 src -j ACCEPT
#
@clickinfinite
clickinfinite / gifextract.py
Created November 13, 2017 07:19 — forked from BigglesZX/gifextract.py
Extract frames from an animated GIF, correctly handling palettes and frame update modes
import os
from PIL import Image
'''
I searched high and low for solutions to the "extract animated GIF frames in Python"
problem, and after much trial and error came up with the following solution based
on several partial examples around the web (mostly Stack Overflow).
There are two pitfalls that aren't often mentioned when dealing with animated GIFs -