Skip to content

Instantly share code, notes, and snippets.

View Dispader's full-sized avatar
:electron:
Present Company Excluded, LLC

Jake Gage Dispader

:electron:
Present Company Excluded, LLC
View GitHub Profile
@Dispader
Dispader / gist:3981176
Created October 30, 2012 16:04
HTTP/S proxy servers for outbound connections
# outgoing HTTP/HTTPS proxy definitions
#
export http_proxy='http://kraken02.oit.umn.edu:3128'
export https_proxy='http://kraken02.oit.umn.edu:3128'
@Dispader
Dispader / snippet overriding hostname verifier
Created March 28, 2013 17:32
snippet overriding hostname verifier
HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
public boolean verify(String hostname, SSLSession session) {
return true;
}
});
import javax.crypto.Cipher;
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES");
System.out.println("maximum supported AES key length: " + maxKeyLen);
System.out.print("Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files ");
if ( maxKeyLen <= 128 ) {
System.out.println("not intsalled.");
} else {
System.out.println("intsalled.");
}
@Dispader
Dispader / obtainTestUsers.sql
Created July 26, 2013 15:52
This query selects for users with available loan types matching those in the new Electronic Promissory Note PeopleSoft Campus Solutions data scheme, in which promossory notes are defined by generic type.
-- This query selects for users with available loan types matching those in the new Electronic Promissory Note
-- PeopleSoft Campus Solutions data scheme, in which promossory notes are defined by generic type.
--
-- The key to these new loan types are definitions in the PeopleSoft PS_UM_FA_ITM_ADDL table, defining
-- "loan templates" for promissory notes. All types of these loans should be supportable via use of the new
-- EPN ("epn", Electronic Promissory Notes for generic loan types) application.
--
-- Older Perkins and ULoan types are currently supported using the older "epromnote" application, but can be
-- supported by the new application via updating the data in the PS_UM_FA_ITM_ADDL for a PeopleSoft Campus
-- Solutions instance. This should put loan type control back in the hands of the business experts supporting
@Dispader
Dispader / sample.sql
Created August 9, 2013 23:31
example query from Financial Aid Status
SELECT A.CPS_SCHOOL_CODE, A.DESCR, B.SUSPEND_REASON
FROM PS_INST_SCHOOL_CDS A, PS_ISIR_00_1_EC B
WHERE B.IWD_TRANS_NBR = (SELECT MAX( C.IWD_TRANS_NBR)
FROM PS_ISIR_00_1_EC C
WHERE C.ECTRANSID = B.ECTRANSID
AND C.EMPLID = B.EMPLID)
AND A.CPS_SCHOOL_CODE = B.CPS_SCHOOL_CODE
AND A.INSTITUTION = ?
AND A.AID_YEAR = ?
AND A.CPS_SCHOOL_CODE NOT LIKE 'G%'
@Dispader
Dispader / commit.txt
Created August 28, 2013 21:45
Here is a template originally written by Tim Pope at tpope.net:
Short (50 chars or less) summary of changes
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.
Further paragraphs come after blank lines.
dat<- data.frame(t=seq(0, 2*pi, by=0.1) )
xhrt <- function(t) 16*sin(t)^3
yhrt <- function(t) 13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t)
dat$y=yhrt(dat$t)
dat$x=xhrt(dat$t)
with(dat, polygon(x,y, col="hotpink"))
@Dispader
Dispader / sepia.js
Created November 29, 2013 19:57
a quick bookmarklet to modify main page styles for readability
javascript: (function () {
var newSS, styles = '* { background: black ! important; color: white !important } :link, :link * { color: #AAAAFF !important } :visited, :visited * { color: #9191FF !important }';
if (document.createStyleSheet) {
document.createStyleSheet("javascript:'" + styles + "'");
} else {
newSS = document.createElement('link');
newSS.rel = 'stylesheet';
newSS.href = 'data:text/css,' + escape(styles);
document.getElementsByTagName("head")[0].appendChild(newSS);
}
@Dispader
Dispader / build.gradle
Created December 20, 2013 21:10
this builds an entire Spring/Hibernate stack, application, and deploys it to all instances
apply plugin: 'eclipse'
apply plugin: 'war'
repositories {
mavenCentral()
}
dependencies {
providedCompile 'javax.servlet:servlet-api:2.5'
providedCompile 'log4j:log4j:1.2.16'
@Dispader
Dispader / crontab
Created January 24, 2014 23:38
new webapps-ent (oit-wa-ent0[1,2]) crontab entries
# Restart webapps-ent daily
0 4 * * * /swadm/init.d/webapps-ent downtime-httpd >> /swadm/cronlogs/cron.log 2>&1
5 4 * * * /swadm/init.d/webapps-ent stop-tomcat >> /swadm/cronlogs/cron.log 2>&1
55 4 * * * /swadm/init.d/webapps-ent start-tomcat >> /swadm/cronlogs/cron.log 2>&1
0 5 * * * /swadm/init.d/webapps-ent start-httpd >> /swadm/cronlogs/cron.log 2>&1
# Bring up the downtime page Sunday mornings.
0 06 * * 0 /swadm/init.d/webapps-ent downtime-httpd >> /swadm/cronlogs/cron.log 2>&1