Skip to content

Instantly share code, notes, and snippets.

View dougblackjr's full-sized avatar
:shipit:
Let's create opportunity and clear the path together! tripleNERDscore.net

Doug Black dougblackjr

:shipit:
Let's create opportunity and clear the path together! tripleNERDscore.net
View GitHub Profile
@dougblackjr
dougblackjr / php-fpm-Dockerfile
Created May 3, 2020 14:05
Use PDFtk with Laradock
# ADD THESE LINES AFTER LINE 937, BEFORE Configure locale.
RUN mkdir -p /usr/share/man/man1mkdir -p /usr/share/man/man1
RUN apt-get update
RUN apt-get install -y openjdk-11-jdk
RUN apt-get install -y pdftk
@dougblackjr
dougblackjr / iframeLoader.js
Created July 26, 2019 17:28
Script to get the current query string variables and load them into the designated iframe (https://jsfiddle.net/dougblackjr/v41ztjes/4/)
const iframeLoader = {
baseUrl: 'http://interimhh.hrmdirect.com/employment/job-openings.php?search=true&',
queryStrings: [
'dept',
'city',
'state',
'cust_sort1'
],
init: function(id) {
@dougblackjr
dougblackjr / index.js
Created March 8, 2019 23:57
SPY: Spies user interactions for sending back to server, or dumping to browser
var Spy = (function (register, undefined) {
var eventStore = [],
events = ['click'];
var store = function (type, data) {
eventStore.push({
type: type,
data: data
});
};
@dougblackjr
dougblackjr / index.html
Created January 23, 2019 11:42
jQuery promise with deconstructed arrays
<!-- The div we'll write stuff in -->
<div id="final">
</div>
<div class="event-wrap">
<span data-title="test-1">words</span>
</div>
<div class="event-wrap">
<span data-title="test-2">words</span>
@dougblackjr
dougblackjr / LocalValetDriver.php
Created September 18, 2018 13:58
Laravel Valet Driver for ExpressionEngine
<?php
/**
* Laravel Valet Driver for ExpressionEngine
* To install:
* 1) Install Valet
* 2) Add this file to the document/project root
*/
class LocalValetDriver extends ValetDriver {
@dougblackjr
dougblackjr / gist:1d7964702ac987f241cba5d910ac0408
Created August 23, 2018 17:30
Bash alias to help you if you have a bunch of SSH hostnames you forget constantly
# Add this to your ~/.bash_profile and restart your terminal
alias sshhosts="grep -w -i "Host" ~/.ssh/config | sed 's/Host//'"
@dougblackjr
dougblackjr / gist:0d7bc193a07971a40dcf1d6f3bad3620
Created August 22, 2018 17:07
Mass select authors by name in Wordpress import
var a = $('ol#authors li strong')
a.each(function(index, el) {
let b = $(el).text().split(' (')[0]
let c = $(el).closest('li')
let d = $(c[0]).find('div select option:contains("' + b + '")').val();
$(c[0]).find('div select').val(d)
});
@dougblackjr
dougblackjr / Instructions.md
Created March 26, 2018 13:15
Unfavorite All tweets

WHY

If you're like me, you favorite a ton of tweets. Employers can go through and see those, and you may not want that.

RUN

Navigate to your favorites page on your profile: https://twitter.com/i/likes

Open your JS console.

Run this code.

@dougblackjr
dougblackjr / instructions
Created April 30, 2017 18:14
Automatically append intro/outro to podcast, convert to mp3 (use with Quelea, sox, and lame)
1) Place this batch file in with your raw wav files
2) Set the introlocation (where your intro and outro files are located) and outputlocation (where you want the final mp3 to land)
3) Run this batch file.
This will fine the most recent wav file in the current directory, append the intro and outro, and then convert it to mp3.
Especially good for use with Quelea. Requires sox.exe and Lame encoder (This script uses Lame for Audacity)
Created and used on Windows 10. Please let me know if you have issues!