Skip to content

Instantly share code, notes, and snippets.

View crystoll's full-sized avatar

Arto Santala crystoll

View GitHub Profile
@crystoll
crystoll / init-semarchy-web.sh
Last active March 19, 2018 10:11
Semarchy init script
#!/bin/bash -xe
# This script will install JDK 8 + Tomcat + Semarchy as service that responds in ports 8088 and 80 and will auto-start
if [ "$#" -ne 4 ]; then
echo "No arguments supplied. Supply private ip for Oracle database to connect to, and database name, database user and password."
exit 1
fi
SEM_IP=$1
#!/bin/bash -xe
if [ "$#" -ne 2 ]; then
echo "No arguments supplied. Supply two arguments, password for SYS role to use when creating the database, and database name."
exit 1
fi
DB_PASSWORD=$1
DB_NAME=$2
/** Crazy 1 */
import java.util.ArrayList;
public class Crazy1 {
// Props to:
// - https://stackoverflow.com/questions/15496/hidden-features-of-java
// - Java Puzzlers (Joshua Bloch)