Skip to content

Instantly share code, notes, and snippets.


Damion dbrownidau

View GitHub Profile
dbrownidau / lick.js
Created Aug 5, 2022
Catalog everyone who liked a tweet
View lick.js
var set = new Set();
x = setInterval(function(){
var allSpans = document.getElementsByTagName('span');
var reg = /@/
for(let item of allSpans ){
dbrownidau /
Last active Sep 8, 2021
cute script to feed elasticsearch
#!/usr/bin/env python3
from datetime import datetime
import json
import websocket
import time
from elasticsearch import Elasticsearch
from queue import Queue
from threading import Thread
import threading
dbrownidau /
Last active Nov 15, 2021
Policyd installation (debian 10, postgresql, postfix)
# Debain 10, postgresql, postfix
# This servers as a lose lazy refernce, not a turnkey runscript.
# See:
# requirements
apt install libnet-server-perl libnet-cidr-perl libnet-dns-perl libmail-spf-perl libtimedate-perl libdbi-perl libdbd-pg-perl
# Use 2.1.x snapshot
dbrownidau /
Last active Jul 8, 2019
MailHog Standalone Installation / Systemd service script
# -r, --system create a system account
# -m, --create-home create the user's home directory (by default no home created for system accounts)
# -s, --shell SHELL login shell of the new account (Do system accounts get nologin by default anyway?)
sudo useradd -r -m -s /usr/sbin/nologin mailhog
wget -O /home/mailhog/MailHog_linux_amd64
# make exec.
# I like to keep the binary non-writeable by the executing user.
dbrownidau /
Created May 21, 2019
SSLPoke Debug quick

How 2 for debug for dummies

  1. cd to ~
  2. create a new file called "" containing the same as below
  3. javac to create SSLPoke.class
  4. java SSLPoke to execute (from current directory (classpath))


dbrownidau /
Last active May 10, 2019
dump yt videos in highest quality
youtube-dl --merge-output-format mp4 $1
# Since the end of April 2015 and version 2015.04.26, youtube-dl uses -f bestvideo+bestaudio/best as the default format selection (see #5447, #5456).
# If ffmpeg or avconv are installed this results in downloading bestvideo and bestaudio separately and muxing them together into a single file giving the best overall quality available.
# Otherwise it falls back to best and results in downloading the best available quality served as a single file.
dbrownidau / run.sql
Last active May 6, 2019
Confluence database encoding & collation setup (Postgresql)
View run.sql
# As of Confluence 6.15 please use char encoding UTF-8
# WARN: Collations, such as "C", are known to cause issues with Confluence.
# Ommitting collation settings will cause the system to default to current locale.
# If you force " LC_COLLATE = 'en_US.UTF-8' " and the system local is not en_US, errors will occure.
create database confluence with owner confluence ENCODING 'utf-8';
dbrownidau / run.sql
Last active May 6, 2019
Jira database encoding & collation setup (Postgrsql)
View run.sql
# As of Jira 8.1
create database jira with owner jira ENCODING 'UNICODE' LC_COLLATE 'C' LC_CTYPE 'C' TEMPLATE template0;
dbrownidau / 50unattended-upgrades
Last active May 7, 2019
Lazy unattended upgrades what could go wrong
View 50unattended-upgrades
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";
Unattended-Upgrade::Mail "**EMAIL HERE**";
// Automatically upgrade packages from these
Unattended-Upgrade::Origins-Pattern {
dbrownidau / jira
Last active Apr 30, 2019
Jira logrotate config (/etc/logrotate.d/jira)
View jira
su jira jira
rotate 30