Skip to content

Instantly share code, notes, and snippets.

View matthewbdaly's full-sized avatar

Matthew Daly matthewbdaly

View GitHub Profile
@jbrown123
jbrown123 / initialization.sql
Last active January 25, 2024 17:24
Creating arbitrary-depth recursive queries in SQLITE (works for any SQL compliant system) using CTEs (common table expressions)
DROP TABLE IF EXISTS users;
DROP VIEW IF EXISTS bp;
CREATE TABLE users (name, cn, title, manager);
CREATE VIEW bp AS
-- create a CTE (common table expression)
-- think of this as creating a temporary table that only exists during this query
-- works somewhat like CREATE TEMPORARY TABLE bosspath(cn, path)
WITH RECURSIVE bosspath(cn,path) AS
(
@Belphemur
Belphemur / iptables-tarpit.conf
Last active October 10, 2022 18:29
Tarpit Action for Fail2ban with rate limit
# Fail2Ban configuration file
#
# Author: Cyril Jaquier
# Modified: Yaroslav O. Halchenko <debian@onerussian.com>
# made active on all ports from original iptables.conf
# Modified: Antoine Aflalo <antoine@aaflalo.me>
# Used the iptables-allports.conf as base for TARPIT.
#
#