Skip to content

Instantly share code, notes, and snippets.

View eiginn's full-sized avatar

Ryan Carter eiginn

View GitHub Profile
@eiginn
eiginn / sudo.py
Created April 22, 2019 17:43 — forked from perfecto25/sudo.py
saltstack sudo module
# Custom Execution Module - SUDO ACCESS
# tested for Centos 7
import salt
import time
import os
import logging
import re
from datetime import datetime, timedelta
import subprocess
@eiginn
eiginn / Netfilter-IPTables-Diagrams.md
Created September 18, 2018 22:09 — forked from nerdalert/Netfilter-IPTables-Diagrams.md
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

@eiginn
eiginn / 00_rings.md
Created March 10, 2018 06:10 — forked from keijiro/00_rings.md
KodeLife fragment shader sketch

gif

@eiginn
eiginn / 00_blot5.md
Created March 10, 2018 06:09 — forked from keijiro/00_blot5.md
KodeLife fragment shader sketch

gif

@eiginn
eiginn / 00_blot6.md
Created March 10, 2018 06:09 — forked from keijiro/00_blot6.md
KodeLife fragment shader sketch

gif

@eiginn
eiginn / gist:2c871955d33df0ff771e5b604df3fd75
Created September 27, 2017 18:21 — forked from gdestuynder/gist:0db99a45872d4bfc4dc9
Google authenticator (base32) and OATH (hex) TOTP QR code generator
#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Required packages (available from pip) : pyqrcode, pypng
import pyqrcode
import base64
@eiginn
eiginn / remerge.py
Created April 11, 2017 22:59 — forked from mahmoud/remerge.py
Recursively merging dictionaries with boltons.iterutils.remap. Useful for @hynek's configs. https://twitter.com/hynek/status/696720593002041345
"""
This is an extension of the technique first detailed here:
http://sedimental.org/remap.html#add_common_keys
In short, it calls remap on each container, back to front, using the accumulating
previous values as the default for the current iteration.
"""
@eiginn
eiginn / dhcpd.conf
Created April 21, 2016 03:38 — forked from robinsmidsrod/dhcpd.conf
Trying to chainload iPXE with full feature set from a lesser featured one, whilst still being able to boot non-supported cards with UNDI
ddns-update-style none;
deny bootp; #default
authoritative;
include "/etc/dhcp/ipxe-option-space.conf";
# GREEN
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.100 10.1.1.199;
option subnet-mask 255.255.255.0;
import ConfigParser, mmap
config_file = "/usr/share/applications/google-chrome.desktop"
add_string_to_each_section = ["StartupWMClass", "Google-chrome-stable"]
option = add_string_to_each_section[0]
value = add_string_to_each_section[1]
class Fixer:
def check(self, cf, option, value):