(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Twitter ID, Screen name, Followers | |
12,jack,6526006 | |
13,biz,2608289 | |
20,ev,1679155 | |
57,SarahM,17448 | |
59,Tim535353,9340 | |
76,marciadorsey,19501 | |
224,davepell,57523 | |
291,goldman,916937 |
object ZipManager { | |
fun zip(files: List<File>, zipFile: File) { | |
ZipOutputStream(BufferedOutputStream(FileOutputStream(zipFile))).use { output -> | |
files.forEach { file -> | |
(file.length() > 1).ifTrue { | |
FileInputStream(file).use { input -> | |
BufferedInputStream(input).use { origin -> | |
val entry = ZipEntry(file.name.toRealName()) | |
output.putNextEntry(entry) |
import org.gradle.api.file.SourceDirectorySet | |
import org.gradle.api.internal.HasConvention | |
import org.gradle.api.tasks.SourceSet | |
import org.gradle.api.tasks.SourceSetContainer | |
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet | |
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | |
//————————————————————————————————————————————————————————————————————————————————————————————————— | |
// BUILD SCRIPT. | |
//————————————————————————————————————————————————————————————————————————————————————————————————— |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(def cds (collection)) | |
;; interact with database | |
(go | |
(>! (:in cds) | |
{:op :create | |
:val {:title "Soft Machine Vol. 1" | |
:artist "Soft Machine" | |
:year 1969}}) |
/** | |
* Sample component implementation showing the usage of constructor injection | |
* avoiding the need to declare a constructor by the help of Lombok. There are | |
* several advantages of using constructor injection over field injection: | |
* | |
* <ol> | |
* <li>The class communicates its dependencies. Just start with {@code new | |
* MyDependencyImpl(…}and your IDE will tell you what you need to hand it in. No | |
* need to look into the implementation of the class to discover that.</li> | |
* <li>The class can only be used in valid state. The constructor argument require |
# find head commit | |
git reflog | |
# now reset hard - where N is the head commit found in the reflog | |
git reset --hard HEAD@{N} |
Many of these are from Strangeloop talks and tweets, I can't promise all are as it was a fast paced mess (if anyone cares, these are in reverse order): | |
I found this last night: blueprints graph db adapter for datomic: | |
https://github.com/datablend/blueprints/tree/master/blueprints-datomic-graph | |
The Boundary crew continue building great things & sharing their experience via excellent blogging: | |
http://boundary.com/blog/2012/09/26/incuriosity-killed-the-infrastructur/ | |
Disruptor Workshop Materials: | |
http://mechanitis.blogspot.com/2012/09/strangeloop-disruptor-workshop-materials.html |
This gist is a collection of my rough notes from Strange Loop 2012.
//This sample is how to use websocket of Tomcat. | |
package wsapp; | |
import java.io.IOException; | |
import java.nio.ByteBuffer; | |
import java.nio.CharBuffer; | |
import java.util.ArrayList; | |
import org.apache.catalina.websocket.MessageInbound; | |
import org.apache.catalina.websocket.StreamInbound; | |
import org.apache.catalina.websocket.WebSocketServlet; |