Skip to content

Instantly share code, notes, and snippets.

View moparisthebest's full-sized avatar

Travis Burtrum moparisthebest

  • Franklin, OH, USA
View GitHub Profile
@moparisthebest
moparisthebest / PersonDAO.java
Created June 8, 2017 20:00
JdbcMapper test example
package com.moparisthebest.jdbc.codegen;
import com.moparisthebest.jdbc.Cleaner;
import com.moparisthebest.jdbc.dto.FieldPerson;
import com.moparisthebest.jdbc.dto.Person;
import java.io.Closeable;
import java.sql.SQLException;
import java.sql.Time;
import java.sql.Timestamp;
@moparisthebest
moparisthebest / ImpPubKeyFromPriv.c
Created April 18, 2017 18:36 — forked from aleks-f/ImpPubKeyFromPriv.c
CryptoAPI: import public key from private key PEM
#include "windows.h"
#include "wincrypt.h"
#include "stdio.h"
/* This code example:
1) creates a Crypto Service Provider
2) generates keys
3) extracts public key
4) exports private key into PEM
@moparisthebest
moparisthebest / keybase.md
Created November 2, 2015 19:51
keybase.md

Keybase proof

I hereby claim:

  • I am moparisthebest on github.
  • I am moparisthebest (https://keybase.io/moparisthebest) on keybase.
  • I have a public key whose fingerprint is 81F1 C22D D411 09D4 A9C0 A7B5 B070 F8D9 7D1A 0BBA

To claim this, I am signing this object:

@moparisthebest
moparisthebest / hgtogit
Last active December 12, 2022 18:08
I prefer to work in Git and push changes out to Hg, but completely automated
#!/bin/sh
#adapted from https://gist.github.com/acdha/477247
if [ "$1" != "" ]
then
# we must want to clone a hg repo, then convert it
remote="$1"
local="$2"
[ "$local" = "" ] && local="$(basename "$remote")"
hg clone "$remote" "$local" || exit
@moparisthebest
moparisthebest / Calculator.java
Last active August 29, 2015 14:01
This is a sample program that shows how to generate java source code, compile, and run it, all at runtime and without ever touching the filesystem. It can be used for much more complicated (and usefull) things, perhaps like creating Pojo instances from ResultSets. :)
package com.moparisthebest.calc;
public interface Calculator {
public double calc(double a, double b);
public java.util.Date whenGenerated();
}
@moparisthebest
moparisthebest / Auth.java
Created February 28, 2012 21:02
AuthURL support
/**
* Copyright (C) 2011 moparisthebest
* <p/>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p/>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of