Skip to content

Instantly share code, notes, and snippets.

@jtkorb
jtkorb / eveauth.py
Created January 14, 2017 19:04
Web2Py OAuth Implementation for EVE Online
# OAuth Implementation for EVE Online
#
# Obtain Client ID and Client Secret by registering at https://developers.eveonline.com. Desired
# scope must also be registered. The scope entries needed by the application can be determined by
# looking at the API calls requiring authentication at https://esi.tech.ccp.is/latest.
#
CLIENT_ID = myconf.get('eve.client_id')
CLIENT_SECRET = myconf.get('eve.client_secret')
SCOPE = myconf.get('eve.scope')
@jtkorb
jtkorb / hg-remove-bin.sh
Created August 3, 2015 14:12
Shell script to remove bin files from a Mercurial repository.
#!/bin/sh
if [ -d .hg ]
then
echo "Current directory contains a hg repository; try up a level."
exit 1
fi
if [ "$1" == "" ]
then
echo "Usage: $0 hg-repository-directory"
exit 1
public class Constants {
/**
* The list of the locations currently supported by the system.
*/
public static final String[] locations = { "LWSN", "PMU", "CL50", "ARMS",
"PHYS", "MSEE", "EE", "BRNG", "WTHR", "ELLT", "STEW", "UNIV", "HAAS",
"NUCL", "PUSH" };
/**
* The coordinates of those locations relative to the CampuseCropped.pn map.
/**
* Exception Demonstration
*
* Run main method with
*
* no arguments
* 0
* 1
* hello
*
@jtkorb
jtkorb / SimpleFileIO.java
Created February 21, 2013 12:07
A program to demonstrate simple text-based input and output in Java.
/**
* Simple File IO
*
* A program to demonstrate simple text-based input and output in Java.
*
* This version uses PrintStream, the same class as System.out. An
* alternative implementation would be to use the PrintWriter class.
*
* @author jtk
*
@jtkorb
jtkorb / Java JTK.xml
Created March 30, 2012 12:27
JTK Eclipse settings for Java formatting
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="Java JTK" version="12">
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>