Skip to content

Instantly share code, notes, and snippets.

Josh Padnick josh-padnick

Block or report user

Report or block josh-padnick

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@josh-padnick
josh-padnick / computeEGA
Created Mar 25, 2014
Compute Estimated Gestational Age from Due Date (Javascript)
View computeEGA
// Usage: computeEGA(2014, 4, 14);
// Computes the Estimated Gestational Age of a patient based on today's date and her Expected Due Date (EDD)
// Sample data
var iDueDateYear = 2014;
var iDueDateMonth = 4;
var iDueDateDay = 14;
function computeEGA( iDueDateYear, iDueDateMonth, iDueDateDay ) {
var dToday = new Date();
@josh-padnick
josh-padnick / MyController.java
Created Jul 18, 2014
Ugly Sample of JDBC Promises in Play (probably with anti-patterns)
View MyController.java
public void sendTextMessage() throws SQLException {
// Open a connection
CustomConnectionMgr.openConnection();
// Tell the connection object to start a transaction
CustomConnectionMgr.startTransaction();
F.Promise<Integer> notifyBatchIdPromise;
F.Promise<Integer> notifyConversationIdPromise;
@josh-padnick
josh-padnick / minion
Created Jan 21, 2015
Masterless Salt Minion
View minion
file_client: local
file_roots:
base:
- /srv/salt/base
@josh-padnick
josh-padnick / Dockerfile
Created Feb 17, 2015
Dockerfile Example
View Dockerfile
# MINIMAL DOCKER IMAGE FOR RUNNING A MICROSERVICE
FROM ohmygoshjosh/busybox
MAINTAINER Josh Padnick <josh@tinysteps.co>
# MICROSERVICE ENV VARS
# ------------------------------------------------------------------------------
ENV MICROSERVICE_NAME lemon
@josh-padnick
josh-padnick / rsync.sh
Created Mar 4, 2015
Using Rsync to Sync a Directory to a Remote Instance
View rsync.sh
rsync -ra --out-format='[%t]--%n' --delete /path/to/local/folder/ <SSH-USER>@<SERVER-IP-ADDRESS>:/path/to/remote/folder
View install-go-cross-compile.sh
#!/bin/bash
# Install goxc
go get github.com/laher/goxc
# May need to do these commands...
goxc -t
# Build the binaries
`GOOS=darwin GOARCH=386 go build -o /home/ubuntu/builds/ec2-snapper/0.1.0/darwin_386/ec2-snapper`
View gist:1b951f7b089a33ad3bce
// Hello human (for machine readable JSON, use the "application/json" Accept header)
{
"compare" : "https://github.com/PhoenixDevOps/phxjug-play-framework-demo/compare/be242da2963b...8f39e4044911",
"previous_successful_build" : {
"build_num" : 22,
"status" : "success",
"build_time_millis" : 796881
},
"build_parameters" : null,
View chrome-policy.json
{
"homepage" : "http://infusionsoft.com"
}
View keybase.md

Keybase proof

I hereby claim:

  • I am josh-padnick on github.
  • I am ohmygoshjosh (https://keybase.io/ohmygoshjosh) on keybase.
  • I have a public key ASCbtKTyzn5uSF7Jp_xL6uF1SUxIqlexOpnujOuZPGVMJQo

To claim this, I am signing this object:

@josh-padnick
josh-padnick / go-test.sh
Created Apr 1, 2016
go test all but vendor directory
View go-test.sh
go test $(go list ./... | grep -v /vendor/)
You can’t perform that action at this time.