Skip to content

Instantly share code, notes, and snippets.

shale shalecraig

Block or report user

Report or block shalecraig

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

Keybase proof

I hereby claim:

  • I am shalecraig on github.
  • I am shalecraig ( on keybase.
  • I have a public key whose fingerprint is 9D5C E1FA B1EC 7A2C C155 3964 1828 B3FD 10BC 455C

To claim this, I am signing this object:

shalecraig /
Created Jan 6, 2015
I find these annoying to lookup.

Parent project:

mvn archetype:generate -DinteractiveMode=true -DarchetypeGroupId=org.codehaus.mojo.archetypes -DarchetypeArtifactId=pom-root -DarchetypeVersion=1.1

Child Project:

mvn archetype:generate -DinteractiveMode=true -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.1


String lastId = null;
while (true) {
    BalanceTransactionCollection balanceTransactions =
                    Collections.<String, Object>singletonMap("starting_after", lastId)
    for (BalanceTransaction tx : balanceTransactions.getData()) {
        // ..
shalecraig / pry-help
Created Oct 20, 2014
Help page shown in pry :D
View pry-help
help Show a list of commands or information about a specific command
cd Move into a new context (object or scope).
find-method Recursively search for a method within a Class/Module or the current namespace.
ls Show the list of vars and methods in the current scope.
pry-backtrace Show the backtrace for the Pry session.
raise-up Raise an exception out of the current pry instance.
reset Reset the REPL to a clean state.
shalecraig / test.cpp
Last active Aug 29, 2015
Testing the speed of adding and removing items from a list vs vector.
View test.cpp
#include <time.h>
#include <iostream>
#include <list>
#include <vector>
using namespace std;
list<int> list_timed;
View inline-jquery-delay
var waitForJquery = function(jqueryCallback, interval) {
if(typeof $ === 'function') {
} else {
setTimeout(function() {
if(typeof $ === 'function'){
} else {
waitForJquery(jqueryCallback, interval);
shalecraig /
Created Apr 19, 2013
Take a guess at what this does...
public class Test {
public static void main(String[] args) {
static {
shalecraig / School Makefile
Last active Dec 15, 2015
School Makefile that I use in the root of my school home directory.
View School Makefile
# This is the makefile I use to organize/build/etc my school notes.
# The general directory structure is as follows:
# $tree courseTemplate latex_templates
# course123
# |-- assignments
# |   l-- a1
# |   |-- a1.pdf
# |   l-- a1.tex
# |-- labs
shalecraig / test.cpp
Last active Dec 14, 2015
Kill your computer with this quick memory allocation. Thrashing guaranteed, or your money back.
View test.cpp
#include <cstdlib>
#include <stdio.h>
#include <sys/mman.h>
int main() {
char buffer[100];
int n;
// 16 GB * 1000
void* allRam = malloc(17179869184*1000);
printf("allocated \n");
You can’t perform that action at this time.