Skip to content

Instantly share code, notes, and snippets.

View paulcoghlan's full-sized avatar

Paul Coghlan paulcoghlan

  • United Kingdom
  • 19:55 (UTC)
View GitHub Profile
@paulcoghlan
paulcoghlan / obs-studio-toggle-and-4xmutex.py
Created September 7, 2022 16:21
Same as OBS example, but has 12 toggles and 4 scenes.
# SPDX-FileCopyrightText: 2021 Philip Howard
#
# SPDX-License-Identifier: MIT
# This example gives you eight toggle and eight "mutex" key bindings for OBS studio
#
# MUTEX
# Use the top eight buttons (nearest the USB connector) to bind your scenes.
# The light on these is mutually exclusive- the one you last pressed should light up,
# and this is the scene you should be broadcasting.
@paulcoghlan
paulcoghlan / Vagrantfile
Last active April 15, 2021 16:03
Vagrantfile for ES Bare-metal development
Vagrant.configure("2") do |config|
config.vm.network "private_network", type: "dhcp"
(1..3).each do |i|
config.vm.define "node-#{i}" do |node|
node.vm.box = "ubuntu/focal64"
node.vm.provision "shell",
inline: "echo hello from node #{i}"
end
@paulcoghlan
paulcoghlan / create_album.py
Created August 30, 2020 06:35
Create album directories from Flickr album JSON. Copy over JPGs to relevant directories
import json
import shutil
import string
import re
import os
import glob
with open("albums.json", "r") as read_file:
data = json.load(read_file)
#!/usr/bin/env bash
# Script to upload http-trace.log to ES Cluster
# Requires MINIO_HTTP_TRACE env var to be enabled (-e "MINIO_HTTP_TRACE=/data/http-trace.log")
#
# Usage:
# upload_minio_logs.sh <http_log_file> <run_id>
#
# Environment variables:
# ES_HOST, ES_PORT, ES_USERNAME, ES_PASSWORD - target ES cluster
#!/usr/bin/env bash
# Script to upload http-trace.log to ES Cluster
# Requires MINIO_HTTP_TRACE env var to be enabled (-e "MINIO_HTTP_TRACE=/data/http-trace.log")
#
# Usage:
# upload_minio_logs.sh <http_log_file> <run_id>
#
# Environment variables:
# ES_HOST, ES_PORT, ES_USERNAME, ES_PASSWORD - target ES cluster
@paulcoghlan
paulcoghlan / clamav-mac.md
Created October 13, 2019 18:40 — forked from Uchean/clamav-mac.md
Get ClamAV running on Mac OS X (using Homebrew)

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd process, you'll need a copy of the ClamAV databases.

Create a freshclam.conf file and configure as so

127.0.0.1 api.taboola.com
127.0.0.1 www.api.taboola.com
127.0.0.1 c2.taboola.com
127.0.0.1 www.c2.taboola.com
127.0.0.1 cdn.taboola.com
127.0.0.1 www.cdn.taboola.com
127.0.0.1 urc.taboolasyndication.com
127.0.0.1 www.urc.taboolasyndication.com
127.0.0.1 taboola.com.edgekey.net
127.0.0.1 www.taboola.com.edgekey.net

Keybase proof

I hereby claim:

  • I am paulcoghlan on github.
  • I am paulcoghlan (https://keybase.io/paulcoghlan) on keybase.
  • I have a public key whose fingerprint is 1F8B BE0E EEA5 3923 ACFF 03F0 F568 92A9 5CBE 015F

To claim this, I am signing this object:

@paulcoghlan
paulcoghlan / new_blog_data.php
Created July 8, 2014 14:13
phpbb blog changes
// Grab all profile fields from users in id cache for later use - similar to the poster cache
if ($config['user_blog_custom_profile_enable'])
{
if (!class_exists('custom_profile'))
{
include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
$cp = new custom_profile();
$profile_fields_cache = $cp->generate_profile_fields_template('grab', $users_to_query);
}
}