Skip to content

Instantly share code, notes, and snippets.

@fergbrain
fergbrain / convert.sh
Created February 9, 2022 03:33
Plex Post Processing
#!/bin/bash
#set path='$PATH:/usr/local/bin'
lockFile='/tmp/dvrProcessing.lock'
origFile="$1"
tmpFile="$1.tmp"
tmpEncode="$1.mkv"
tmpSrt="$1.srt"
dvrPostLog='/tmp/dvrProcessing.log'
comcutPath='/opt/comchap/comskip'

Keybase proof

I hereby claim:

  • I am fergbrain on github.
  • I am fergbrain (https://keybase.io/fergbrain) on keybase.
  • I have a public key ASByU7fFdO5JMfpuzq-G3cLUBVcScRBQLCIvEI_SlBmGgAo

To claim this, I am signing this object:

chrt 99 ionice -c1 nice -n -20 ~/jamulus/Jamulus --server --nogui --recording /var/www/jamulus/recording/ --log /var/log/jamulus --servername $(uname -n) --centralserver "jamulus.fischvolk.de:22224" --serverinfo "NW WA;Seattle, WA;225" -g --welcomemessage "This is an expermental service and support is not guarenteed. Please contact [email protected] with questions" --licence&
@fergbrain
fergbrain / fergcorp-cozmo-tweak.php
Last active September 4, 2020 11:28
Tweaks to the Cozmo Profile Builder plugin
<?php
/**
* Plugin Name: Cozmo Tweaks
* Plugin URI: http://fergcorp.com
* Description: Tweaks to the Cozmo Profile Builder plugin.
* Version: 2020.03.07
* Author: Fergcorp
* Author URI: http://fergcorp.com
* License: GPL3
*/
@fergbrain
fergbrain / content-restriction-meta-box.php
Last active April 1, 2019 12:09
Default restrict data
<?php
//Add to /profile-builder-hobbyist/features/content-restriction/content-restriction-meta-box.php starting after line 62 (" $wppb_selected_roles = get_post_meta( $post->ID, 'wppb-content-restrict-user-role' );" )
//Note that this only applies to posts created directly using the WordPress site, not using the API (e.g. using the WordPress App)
// https://wordpress.stackexchange.com/questions/50043/how-to-determine-whether-we-are-in-add-new-page-post-cpt-or-in-edit-page-post-cp
/**
* is_edit_page
* function to check if the current page is a post edit page
*
* @author Ohad Raz <[email protected]>
*
<?php
/**
* Template Name: Events - Calendar - iCal
*
* Author: Andrew Ferguson, [email protected] / [email protected]
* Copyright (C) 2016 Andrew Ferguson
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
<?php
/*
Plugin Name: Subscribe2 HTML License Propagater
Plugin URI: http://semperplugins.com/plugins/subscribe2-html/
Description: Propagates a Subscribe2 HTML License Key over a Multisite Install
Version: 1.0a
Author: Matthew Robinson
Author URI: http://semperplugins.com/plugins/subscribe2-html/
Licence: GPL3
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=2387904
mkdir -p $HOME/src $HOME/tmp
export TMPDIR=$HOME/tmp
export PATH="$HOME/bin:$PATH"
export C_INCLUDE_PATH="$HOME/include:$C_INCLUDE_PATH"
export LIBRARY_PATH="$HOME/lib:$LIBRARY_PATH"
export LD_LIBRARY_PATH="$HOME/lib:$LD_LIBRARY_PATH"
###########################################################
# yasm 1.3.0
@fergbrain
fergbrain / commonWP.example.com
Created August 19, 2014 20:38
WordPress Multiuser Configuration
#File: /etc/nginx/sites-available/commonWP.example.pw;
index index.php;
#fastcgi_cache start
set $skip_cache 0;
# POST requests and urls with a query string should always go to PHP
if ($request_method = POST) {
set $skip_cache 1;
@fergbrain
fergbrain / cron
Created August 16, 2014 20:34
Cleanup Downloads folder once a week
0 0 * * * find ~/Downloads -type f -maxdepth 1 -mtime +7 -exec rm {} \;
0 0 * * * find ~/Downloads -type d -maxdepth 1 -mtime +7 -exec rm -r {} \;