Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ajosephau's full-sized avatar
🕵️
Hustlin'

Anthony Joseph ajosephau

🕵️
Hustlin'
View GitHub Profile
@ajosephau
ajosephau / XMLSec2PEM.java
Created November 2, 2017 02:29
Porting function to contemporary Java libraries from http://www.platanus.cz/blog/converting-rsa-xml-key-to-pem
import java.io.*;
import java.math.BigInteger;
import java.security.*;
import java.security.spec.*;
import java.security.cert.*;
import java.security.interfaces.*;
import java.util.Base64;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@ajosephau
ajosephau / notes.txt
Created February 22, 2017 01:07
Ruby on rails tutorial - creating a basic accounting/Internet banking system
################
## Create new Rails application
################
rails new cfa_accounts
cd cfa_accounts
################
## Add following lines to Gemfile (skip the record_tag_helper for rails 4)
################
@ajosephau
ajosephau / notes.sh
Created February 22, 2017 00:59
Setting up ruby on rails
# setup instructions
## Install atom: https://atom.io
## Install rails - Mac (run commands in Terminal)
### install xcode developer tools
xcode-select --install
@ajosephau
ajosephau / get_time_zones.py
Created January 29, 2017 03:24
A short script to print out all of the timezones from the pytz library
from datetime import datetime
from pytz import all_timezones, timezone
current_time = datetime.now()
print("timezone name, timezone code")
for timezone_name in all_timezones:
current_timezone = timezone(timezone_name)
@ajosephau
ajosephau / OptimisedTest.java
Last active August 29, 2015 14:20
Optimized LeJOS superoptimization experimentation code
import lejos.nxt.*;
public class OptimisedTest
extends CommonNXTTests
{
public static void main( String[] args )
throws Exception
{
//variables
LightSensor lightSensor = new LightSensor( SensorPort.S1 );
@ajosephau
ajosephau / BenchmarkTest.java
Last active August 29, 2015 14:20
Baseline LeJOS superoptimization experimentation code
import lejos.nxt.*;
public class BenchmarkTest
extends CommonNXTTests
{
public static void main( String[] args )
throws Exception
{
//variables
LightSensor lightSensor = new LightSensor( SensorPort.S1 );