(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.
import nl.komponents.kovenant.* | |
import nl.komponents.kovenant.jvm.asDispatcher | |
import java.util.concurrent.CompletableFuture | |
import java.util.concurrent.ForkJoinPool | |
fun main(args: Array<String>) { | |
Kovenant.context { | |
// configure Kovenant with the same pool | |
// CompletableFutures use. By default it's | |
// the common pool. |
(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.
app = angular.module 'BlogExample', [] | |
# Simple controller that loads all blog posts | |
app.controller 'BlogCtrl', ['$scope', 'Blog', ($scope, Blog) -> | |
# Get all the blog posts | |
Blog.all().then (posts) -> | |
$scope.posts = posts | |
# Extend the $scope with our own properties, all in one big block | |
# I like this because it looks like declaring a class. |
package com.jelies.spring3tomcat7.repository; | |
import org.hibernate.Criteria; | |
import org.hibernate.ScrollableResults; | |
import org.hibernate.StatelessSession; | |
import org.hibernate.Transaction; | |
import org.hibernate.criterion.Order; | |
import org.hibernate.criterion.Restrictions; | |
import org.joda.time.LocalDate; | |
import org.springframework.beans.factory.annotation.Autowired; |
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed. | |
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
# | |
# Deployment structure | |
# | |
# SERVER: | |
# /etc/init.d/nginx (1. nginx) | |
# /home/app/public_html/app_production/current (Capistrano directory) | |
# |