Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am justinkelly on github.
  • I am justinkelly (https://keybase.io/justinkelly) on keybase.
  • I have a public key whose fingerprint is CDB0 8D2E 14E3 3A9F E14E E183 C07D 8218 0A00 6212

To claim this, I am signing this object:

To: youremail@gmail.com
From: you@comcast.net
Subject: test message
Test message for ssmtp.
@justinkelly
justinkelly / ssmtp.conf
Last active April 20, 2016 02:44
ssmtp.conf settings
#/bin/sh
echo "mailhub=${SMTP_HOST}:${SMTP_PORT}" > /etc/ssmtp/ssmtp.conf
echo "AuthUser=${SMTP_USER}" >> /etc/ssmtp/ssmtp.conf
echo "AuthPass=${SMTP_PASS}" >> /etc/ssmtp/ssmtp.conf
echo "UseSTARTTLS=YES" >> /etc/ssmtp/ssmtp.conf
@justinkelly
justinkelly / after_footer.html
Created October 19, 2015 03:04
Google Plus for Octopress - footer
@justinkelly
justinkelly / gist:a392483775679377f869
Last active August 29, 2015 14:20
Atom.io text replace for ReseachBank
Date.prototype.yyyymmdd = function() {
var yyyy = this.getFullYear().toString();
var mm = (this.getMonth()+1).toString(); // getMonth() is zero-based
var dd = this.getDate().toString();
return yyyy + (mm[1]?mm:"0"+mm[0]) + (dd[1]?dd:"0"+dd[0]); // padding
};
d = new Date();
$date = d.yyyymmdd();
editor = atom.workspace.activePaneItem
@justinkelly
justinkelly / Alma_highlight_call_number.js
Last active August 29, 2015 14:08
Additional javascript for Alma to highlight the call number
//trim left and right white space
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, "");
};
//get call number
var CALL = document.getElementById("holdingKey").value;
var CALL_LIST = CALL.split(',');
var NUMB = CALL_LIST.slice(-1)[0];
var CALL_NUMBER = NUMB.split('=').slice(-1)[0];
@justinkelly
justinkelly / pdf_merge.php
Created August 19, 2013 05:54
merge pdfs with php
<?php
$path ="lib/";
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
require_once 'lib/Zend/Pdf.php';
// LOAD PDF DOCUMENTS
$pdf1 = Zend_Pdf::load('first.pdf');
$pdf2 = Zend_Pdf::load('second.pdf');
// WE WILL MERGE OUR TWO PDF FILES INTO A NEW ZEND_PDF OBJECT
$pdfMerged = new Zend_Pdf();
<?php
$user = $_SERVER['PHP_AUTH_USER'];
$date = date("Y-m-d H:i:s");
$myFile = "download_log.txt";
$fh = fopen($myFile, 'a') or die("can't open file");
$stringData = "Date , ". $date ." , User , ". $user ."\n";
fwrite($fh, $stringData);
fclose($fh);
@justinkelly
justinkelly / primo-az.js
Last active December 18, 2015 17:29
Make Primo A-Z do rank sorting
/*Make A-Z do rank sorting*/
if($('body').hasClass('EXLAlmaAz'))
{
$input = $("#exlidSearchRibbon input[name='fn']");
if($input.val() =='goAlmaAz')
{
$input.after('<input type="hidden" name="sortField" value="rank">');
}
}
Customer: array(13){
[
"companyId"
]=>int(2)[
"mainContact"
]=>string(13)"Carrier Basic"[
"name"
]=>string(18)"Basic Carrier Test"[
"timeZone"
]=>string(13)"Europe/London"[