This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.promindis.game.snake.stm | |
import akka.actor.{ActorRef, Actor} | |
import java.awt.{Dimension, Graphics2D} | |
import java.awt.event.{ActionEvent, ActionListener} | |
import swing._ | |
import swing.Dialog._ | |
import swing.event.Key._ | |
import swing.event.KeyPressed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
control_c() { | |
if $cygwin; then rm "$USERPROFILE"/play.boot.properties; fi | |
exit 1 | |
} | |
case "`uname`" in | |
CYGWIN*) cygwin=true;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author Mike Slinn | |
# Invoke javap with latest Scala 2.9.1 and Akka 2.0 jars | |
# Does not use SBT or scala scripts, so this actually works on all platforms that have bash, | |
# including Cygwin. | |
# Common Akka and Scala jars are included in the classpath, also the current SBT project | |
# class files if invoked from the root of an SBT project | |
# Invoke javap as usual with all options except classpath: | |
# javap scala.None | |
# You can add to the classpath with -cp, if that option is provided first: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import akka.actor.ActorSystem; | |
import akka.dispatch.*; | |
import com.typesafe.config.ConfigFactory; | |
import java.util.concurrent.Callable; | |
/** This example uses Future.future() to create a future that computes 2+3. */ | |
class ForeachJava { | |
private final String configString = "akka { logConfigOnStart=off }"; | |
ActorSystem system = ActorSystem.apply("actorSystem", ConfigFactory.parseString(configString)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author Mike Slinn | |
# | |
# Requires JAVA_HOME to be set | |
# | |
# Invoke scalac with latest Scala 2.9.1 and Akka 2.0 jars, and Include SBT/Maven compiled project | |
# classes if invoked from root of an SBT/Maven project | |
# Does not use SBT or scala scripts, so this actually works on all platforms that have bash, | |
# including Mac, Linux and Cygwin. | |
# Invoke scala as usual with all options except classpath. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Mike Slinn | |
function FILES { | |
git grep -c $1|sort -t : -k 2 -n -r | |
} | |
ACTION= | |
while getopts "h1n" opt; do | |
case $opt in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# JAVA_HOME must be on the path | |
JAVA_OPTS="-Xss2m -Xmx512M -XX:MaxPermSize=128m -XX:+CMSClassUnloadingEnabled" | |
if [ $OSTYPE == cygwin ]; then | |
export CYGWIN="tty ntsec" | |
JAVA_OPTS="$JAVA_OPTS -Djline.terminal=jline.UnixTerminal" | |
fi | |
java $JAVA_OPTS -jar 'e:/storage/programming/scala/sbt-launch.jar' "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dbpath=D:\storage\programming\mongodb\mongodb-win32-x86_64-2.0.4\bin\data | |
journal=true | |
rest=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Direct dependencies" | |
sbt 'show all-dependencies' | \ | |
gawk 'match($0, /List\((.*)\)/, a) {print a[1]}' | \ | |
tr -d ' ' | tr ',' '\n' | sort -t ':' | \ | |
tr ':' '\t' | expand -t 30 | |
echo -e "\nAll dependencies, including transitive dependencies" | |
sbt 'show managed-classpath' | tr -d ' ' | tr ',' '\n' | \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Update all git directories below specified directories | |
# Skips directories that contain a file called .ignore | |
# See https://stackoverflow.com/a/61207488/553865 | |
HIGHLIGHT="\e[01;34m" | |
NORMAL='\e[00m' | |
export PATH=${PATH/':./:'/:} |
OlderNewer