Skip to content

Instantly share code, notes, and snippets.

View jkeesh's full-sized avatar

Jeremy Keeshin jkeesh

View GitHub Profile
@jkeesh
jkeesh / create_repo.py
Last active January 1, 2024 00:31
Python script to create a remote git repo that checks out the latest commit with a post-receive hook
#
# 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 / 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 / indenting.js
Last active January 26, 2017 01:45
New indenting style for beginners
function start()
{
if(frontIsClear())
{
move();
}
else
{
putBall();
}
@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
@jkeesh
jkeesh / lexicon.js
Created January 4, 2014 08:13
proof of concept lexicon
function Lexicon(file){
this.data = {
'a': {
'b': {
's': {}
}
}
};
}