Skip to content

Instantly share code, notes, and snippets.

View mairin's full-sized avatar

Máirín Duffy mairin

View GitHub Profile
@skwashd
skwashd / pre-commit
Last active February 28, 2024 11:11
Git pre-commit hook that blocks commits for files that contain swear words.
#!/bin/bash -e
#
# Git pre-commit hook that blocks commits for files that contain swear words.
#
# Created by Dave Hall - http://davehall.com.au
# Distributed under the terms of the WTFPL - http://www.wtfpl.net/
#
# Please don't use this fucking script, it is shit!
#
#! /usr/bin/perl
use strict;
use warnings;
use JSON;
use LWP::UserAgent;
use MIME::Base64;
my $json = JSON->new->allow_nonref;
my $ua = LWP::UserAgent->new;