Skip to content

Instantly share code, notes, and snippets.

View nmische's full-sized avatar

Nathan Mische nmische

  • Philadelphia, PA
  • 20:12 (UTC -04:00)
View GitHub Profile
@nmische
nmische / rpms
Created March 3, 2014 19:21
Shibboleth SP RPMs for Amazon Linux
curl-openssl-7.33.0-1.1.x86_64.rpm
curl-openssl-debuginfo-7.33.0-1.1.x86_64.rpm
libcurl-openssl-7.33.0-1.1.x86_64.rpm
libcurl-openssl-devel-7.33.0-1.1.x86_64.rpm
liblog4shib-devel-1.0.8-1.1.x86_64.rpm
liblog4shib1-1.0.8-1.1.x86_64.rpm
libsaml-devel-2.5.3-1.1.x86_64.rpm
libsaml8-2.5.3-1.1.x86_64.rpm
libxerces-c-3_1-3.1.1-2.1.x86_64.rpm
libxerces-c-devel-3.1.1-2.1.x86_64.rpm
@nmische
nmische / conflict.groovy
Created February 13, 2014 02:47
Example of how to find time conflicts.
@Grab(group='joda-time', module='joda-time', version='2.3')
import org.joda.time.DateTime
def eventList = [
[ name: "Event One", startDate: new DateTime(2014,2,12,11,0,0), endDate: new DateTime(2014,2,12,12,0,0) ],
[ name: "Event Two", startDate: new DateTime(2014,2,12,13,0,0), endDate: new DateTime(2014,2,12,14,0,0) ],
[ name: "Event Three", startDate: new DateTime(2014,2,12,11,30,0), endDate: new DateTime(2014,2,12,12,30,0) ],
[ name: "Event Four", startDate: new DateTime(2014,2,12,9,0,0), endDate: new DateTime(2014,2,12,10,0,0) ],
[ name: "Event Five", startDate: new DateTime(2014,2,12,9,0,0), endDate: new DateTime(2014,2,12,10,0,0) ],
[ name: "Event Six", startDate: new DateTime(2014,2,12,10,0,0), endDate: new DateTime(2014,2,12,11,0,0) ],
@nmische
nmische / trans_problem_2.py
Created November 5, 2013 15:11
Gurobi solution for the second transportation problem in An Illustrated Guide to Linear Programming.
from gurobipy import *
try:
cities = ['OklahomaCity','Macon','Columbus']
bases = ['MacDill','March','DavisMonthan','McConnell','Pinecastle']
distance = {
('OklahomaCity','MacDill'): 938,
@nmische
nmische / trans_problem_1.py
Created November 5, 2013 15:08
Gurobi solution for the first transportation problem in An Illustrated Guide to Linear Programming.
from gurobipy import *
try:
factories = ['FactoryOne','FactoryTwo']
stores = ['StoreOne','StoreTwo','StoreThree']
cost = {
('FactoryOne','StoreOne'): 8,
@nmische
nmische / rereplace.cfm
Created October 9, 2013 14:16
Strip white space from selected rc keys.
<cfloop list="owner,editor,moderator,additionals,senders" index="l">
<cfset rc[l] = reReplace(rc[l], "\s", "", "ALL") />
<cfloop>
@nmische
nmische / numbers.java
Last active December 23, 2015 05:09
Get the three most frequent numbers in a list.
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.Iterator;
public class numbers {
DECLARE student_cursor SCROLL CURSOR FOR
SELECT [studentId], [name] FROM students
ORDER BY NEWID()
DECLARE @direction VARCHAR(10),
@studentId INT,
@name VARCHAR(50),
@requestId INT,
@requestCount INT
@nmische
nmische / es_query.json
Created July 1, 2013 20:31
Trying to exclude "-".
{
"query": {
"bool": {
"must": {
"match": {
"@type": "apache"
}
},
"must_not": {
"match": {
@nmische
nmische / log.conf
Created June 27, 2013 20:20
Extended Apache LogFormat for logstash
LogFormat "{ \
\"@source\":\"file://<%= @host %>/<%= @log_path %>/<%= @name %>-logstash.log\", \
\"@source_host\": \"<%= @host %>\", \
\"@source_path\": \"<%= @log_path %>/<%= @name %>-logstash.log\", \
\"@tags\":[\"<%= @host %>\"<% @tags.each do |tag| %>,\"<%= tag %>\"<% end %>], \
\"@message\": \"%h %l %u %t \\\"%r\\\" %>s %b\", \
\"@fields\": { \
\"timestamp\": \"%{%Y-%m-%dT%H:%M:%S%z}t\", \
\"clientip\": \"%a\", \
\"duration\": %D, \
@nmische
nmische / AgileEnvironments.md
Created May 29, 2013 14:33
A description of a work environment in need of an Agile makeover, from Agile Project Management for Dummies.

Conjure up a mental picture of your current working environment. Perhaps it looks like the following setup. The IT team sits in cube city in one departmental area with the project manager somewhere within walking distance. You work with an offshore development team eight time zones away. The business customer is on the other side of the building. Your manager has a small office tucked away somewhere. Conference rooms are usually fully booked, and even if you were to get into one, someone would chase you out within the hour.

Your project documents are stored in folders on a shared drive. The development team gets at least 100 e-mails a day. The project manager holds a team meeting every week and, referring to the project plan, tells the developers what to work on. The project manager also creates a weekly status report and posts it on the shared drive. The product manager is usually too busy to talk to the project manager to review progress, but periodically sends e-mails with some new thoughts about the appl