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
$ git branch -vv --no-merged | |
feature/JDK8 8e89521 First steps to JDK8 | |
feature/jdk8 da4efaa WIP JDK8 Streams/Lambda Migration | |
$ git checkout feature/JDK8 | |
Switched to branch 'feature/JDK8' | |
$ git checkout feature/jdk8 | |
Switched to branch 'feature/jdk8' |
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/sh | |
if ! git diff-index --quiet HEAD --; then | |
echo "Git is dirty, clean up your mess!" | |
exit 1 | |
fi | |
VERSION=`xml sel -N x="http://maven.apache.org/POM/4.0.0" -t -v "/x:project/x:version" pom.xml` | |
BASEVERSION=${VERSION%-SNAPSHOT} | |
ARTIFACTID=`xml sel -N x="http://maven.apache.org/POM/4.0.0" -t -v "/x:project/x:artifactId" pom.xml` |
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
$ /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin/jrunscript | |
nashorn> [1,2,3].length | |
3 | |
$ jrunscript | |
js> [1,2,3].length | |
3.0 |
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
implicit class Piper[A](val a: A) extends AnyVal { | |
def |>[B](fn: (A => B)): B = fn(a) | |
} | |
def add5(a: Int) = a + 5 | |
def times2(a: Int) = a * 2 | |
def pipeit(a: Int) = { | |
(a |> add5 | |
|> times2 |
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 Control.Concurrent | |
import Control.Concurrent.Chan | |
import Data.UUID | |
import Data.UUID.V4 | |
import Network.Socket | |
import System.IO | |
data Message = Message UUID String | |
deriving (Show, Eq) |
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
<plugin> | |
<groupId>com.theoryinpractice.clojure</groupId> | |
<artifactId>clojure-maven-plugin</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<executions> | |
<execution> | |
<id>clojure-compile</id> | |
<goals> | |
<goal>compile</goal> | |
</goals> |
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
(ns com.theoryinpractise.clojure.runnable | |
(:gen-class | |
:implements [java.lang.Runnable])) | |
(defn -run [this] | |
(println "Hello World... from clojure!")) |
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.theoryinpractise.clojure; | |
import org.osgi.framework.ServiceReference; | |
import org.osgi.service.component.ComponentContext; | |
import java.util.Properties; | |
/** | |
* @scr.component | |
*/ |
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
diff --git a/src/jvm/clojure/lang/RT.java b/src/jvm/clojure/lang/RT.java | |
index 502f00d..2e6e01b 100644 | |
--- a/src/jvm/clojure/lang/RT.java | |
+++ b/src/jvm/clojure/lang/RT.java | |
@@ -348,8 +348,7 @@ static public long lastModified(URL url,String libfile) throws Exception{ | |
} | |
else | |
{ | |
- File f = new File(url.toURI()); | |
- return f.lastModified(); |
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
<plugin> | |
<groupId>org.clojure</groupId> | |
<artifactId>clojure-maven-plugin</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<configuration> | |
<namespaces> | |
<namespace>clj-web-crawler</namespace> | |
<namespace>smx-api</namespace> | |
</namespaces> | |
<testScript>src/test/java/test.clj</testScript> |
OlderNewer