Skip to content

Instantly share code, notes, and snippets.

View jaygooby's full-sized avatar
✏️
working on https://writiny.com in my sparse spare time

Jay Caines-Gooby jaygooby

✏️
working on https://writiny.com in my sparse spare time
View GitHub Profile
@jaygooby
jaygooby / log4j-jndi.conf
Last active February 2, 2022 12:04
fail2ban filter rule for the log4j CVE-2021-44228 exploit
# log4j jndi exploit CVE-2021-44228 filter
# Save this file as /etc/fail2ban/filter.d/log4j-jndi.conf
# then copy and uncomment the [log4j-jndi] section
# to /etc/fail2ban/jail.local
#
# jay@gooby.org
# https://jay.gooby.org/2021/12/13/a-fail2ban-filter-for-the-log4j-cve-2021-44228
# https://gist.github.com/jaygooby/3502143639e09bb694e9c0f3c6203949
# Thanks to https://gist.github.com/kocour for a better regex
#
@jaygooby
jaygooby / what-user-agent
Last active December 15, 2021 18:00
bash script to humanize user-agent strings using the whatismybrowser.com API
Moved to https://github.com/jaygooby/what-user-agent
@jaygooby
jaygooby / kaslurp
Last active December 8, 2021 13:50
A REPL wrapper for kaput-cli to download files from put.io
Now https://github.com/jaygooby/kaslurp
@jaygooby
jaygooby / up-and-atom
Last active January 18, 2021 08:12
Opens all your currently uncommitted files from `$PWD` in Atom, ready for a shiny new day of productive work
# I've got this as an alias, but you could just save it to ~/bin etc
#
# You don't have to use atom either, it would work just as well with subl or vim or whatever,
# only the pun's not as good then...
atom . $(git status --porcelain | cut -d" " -f3 | xargs -I {} echo './'{} | xargs)
@jaygooby
jaygooby / jack.rb
Last active November 20, 2020 23:32 — forked from edwardgeorge/jack.rb
Homebrew formula to install JackOSX binary package.
require 'formula'
class Jack <Formula
homepage 'http://jackaudio.org'
version '0.90'
url 'https://dl.dropboxusercontent.com/u/28869550/JackOSX.0.90.zip'
def install
system "xar -xf JackOSX.0.90.pkg"
@jaygooby
jaygooby / membash.sh
Created August 20, 2019 12:50 — forked from goodevilgenius/membash.sh
[membash] BASH script which may be used to interact with memcache. All main memcache functions are supported. #memcache
#!/bin/bash
# Gist: 11375877
# Url: https://gist.github.com/goodevilgenius/11375877
#
# All memcache functions are supported.
#
# Can also be sourced from other scripts, e.g.
# source membash.sh
# MCSERVER="localhost"
@jaygooby
jaygooby / ttfb.sh
Last active March 26, 2019 13:44 — forked from sandeepraju/ttfb.sh
curl command to check the time to first byte
# Moved to https://github.com/jaygooby/ttfb.sh
@jaygooby
jaygooby / mysql-health-check.sh
Created August 29, 2018 15:17
Very basic mysql health check
# A very basic mysql health check that can be used by e.g.
# Consul's External Service Monitor
#
# Cobbled together by @jaygooby from a combination of:
# Unai Rodriguez's and Alex Williams'
# https://gist.github.com/aw/1071144
# and George Chilumbu's
# https://georgechilumbu.wordpress.com/2017/07/27/setup-a-consul-client/
#
# This script checks if a mysql server is healthy running on $MYSQL_HOST.
@jaygooby
jaygooby / os-x-ghostscript-imagemagick
Last active March 9, 2018 16:06
Download and install imagemagick plus configure automator app for converting PDFs to PNGs
#!/usr/bin/env bash
# Install using:
# bash < <(curl -s https://gist.githubusercontent.com/jaygooby/1248106/raw/6d8ef1c0c84a47a34a6890973c8d32d22466a736/os-x-ghostscript-imagemagick)
IM_TGZ=ImageMagick-x86_64-apple-darwin17.3.0.tar.gz
IM_URL=https://www.imagemagick.org/download/binaries/$IM_TGZ
IM_TMP_FILE=/tmp/$(basename $IM_URL)
IM_SUM="33849 17409"
#!/bin/bash
#
# Do you need a cluster of http servers to test your nginx proxying set up?
# I did, so I wrote this. https://twitter.com/jaygooby
#
# Defaults to starting 5 servers on 127.0.0.1 ports 2000 - 2004
# You can optionally specify the starting port and the number of servers you need...
#
# START_PORT=8000 NUM_SERVERS=9 bash_http_cluster.sh
#