Skip to content

Instantly share code, notes, and snippets.

View jkeesh's full-sized avatar

Jeremy Keeshin jkeesh

View GitHub Profile
@jkeesh
jkeesh / ConsoleProgram.java
Created October 18, 2018 19:11
CodeHS Console Program
import java.util.*;
public class ConsoleProgram{
private Scanner scanner;
public static void main(String[] args){
// Assume the class name is passed in as the first argument.
if(args.length == 0){
@jkeesh
jkeesh / create_repo.py
Created October 7, 2018 04:02
python script for setting up git directories on remote servers
#
# This script creates a repository and sets it up with a post receive
# hook that checks out the code to the desired directory.
#
# Really nice for setting up an easy way to push code to a remote
# server without lots of overhead.
#
# After running this script simply add a remote locally like
#
# git remote add web ssh://you@server/path/to/repo.git
@jkeesh
jkeesh / contract.sol
Created July 16, 2017 08:49
dogetoken contract
pragma solidity ^0.4.10;
/*
This is the API that defines an ERC 20 token, all of these functions must
be implemented.
*/
contract ForeignToken {
function balanceOf(address _owner) constant returns (uint256);
function transfer(address _to, uint256 _value) returns (bool);
@jkeesh
jkeesh / hello.sol
Created June 28, 2017 20:42
Hello World Solidity Contract for Ethereum
pragma solidity ^0.4.0;
contract mortal {
/* Define variable owner of the type address*/
address owner;
/* this function is executed at initialization and sets the owner of the contract */
function mortal() { owner = msg.sender; }
/* Function to recover the funds on the contract */
@jkeesh
jkeesh / Autograder.java
Created September 18, 2016 20:40
Snackpack Main Scanner grader
import java.io.*;
import java.lang.*;
import java.util.*;
import org.json.*;
public class Autograder
{
/**
@jkeesh
jkeesh / Grader.java
Created September 18, 2016 18:31
SnackPack Grader
import java.util.*;
public class Grader
{
public static void runInputTest(Autograder grader, String[] inputs, String message)
{
// Create a student program
SnackPack studentProgram = new SnackPack();
Verifying that +jkeesh is my blockchain ID. https://onename.com/jkeesh
import java.util.*;
import java.lang.*;
public class ObjectTracker{
// Code for grader
private static HashMap<String, ArrayList<Object>> objTracker = new HashMap<String, ArrayList<Object>>();
// create instancetracker
private static final int CALLER_INDEX = 3;
@jkeesh
jkeesh / Randomizer.java
Created July 16, 2015 23:21
Randomizer - Java
import java.util.*;
public class Randomizer{
public static Random theInstance = null;
public Randomizer(){
}
import java.util.*;
public class ConsoleProgram{
private Scanner scanner;
public static void main(String[] args){
// Assume the class name is passed in as the first argument.
if(args.length == 0){