Skip to content

Instantly share code, notes, and snippets.

Ratpack Production Tunings

# cat /etc/security/limits.conf

*         hard    nofile      500000
*         soft    nofile      500000
root      hard    nofile      500000
root      soft    nofile      500000
@danveloper
danveloper / ratpack.md
Created January 10, 2015 19:14
Ratpack as of 0.9.13

build.gradle

buildscript {
  repositories {
    jcenter()
    maven { url "http://oss.jfrog.org/oss-snapshot-local" }
    maven { url "http://clinker.netty.io/nexus/content/repositories/snapshots" }
  }
  dependencies {
@mgodave
mgodave / gist:7646319
Last active April 3, 2019 08:41
Create a single value Observable from a Guava ListenableFuture.
public static <T> Observable<T> create(ListenableFuture<T> future, Executor executor) {
AsyncSubject<T> subject = AsyncSubject.create();
future.addListener(() -> {
try {
T value = future.get();
subject.onNext(value);
subject.onCompleted();
} catch (Exception e) {
subject.onError(e);
}
@danveloper
danveloper / Application.groovy
Created October 10, 2013 18:00
An example of using the Spring Integration Groovy DSL with a JMS channel adapter to an embedded ActiveMQ JMS broker
package com.danveloper.springboot
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.context.ApplicationContext
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.integration.dsl.groovy.IntegrationContext
import org.springframework.integration.dsl.groovy.builder.AbstractIntegrationBuilderModuleSupport
@warmfusion
warmfusion / README.md
Last active March 17, 2017 20:58
stash-pull-requests widget for Dashing

Description

Simple Dashing widget (and associated job) to display open pull requests for a specific Project and/or repository from Atlassian Stash

See the example.png below for an idea on how this widget looks on a dashboard.

Dependencies

None

@johnrengelman
johnrengelman / build.gradle
Last active December 16, 2015 07:39
Building Grails 2.2.1 with Gradle, with Spock testing and Codenarc and some extra tasks to mimic Java/Groovy projects in Gradle
import org.grails.gradle.plugin.GrailsTask
apply plugin: 'grails'
grails {
grailsVersion '2.2.1'
}
buildscript {
repositories {
@jlongster
jlongster / cloth-lljs.js
Last active December 16, 2015 03:29
large LLJS example
extern clear, fillRect, renderLine, print;
struct Vec2d {
function void Vec2d(float x, float y) {
this->x = x;
this->y = y;
}
float x;
@jpawlowski
jpawlowski / brew-sync.sh
Last active September 26, 2023 19:54
Sync Homebrew installations between Macs via Dropbox
#!/bin/bash
# Sync Homebrew installations between Macs via Dropbox
#
BREW="/usr/local/bin/brew"
# first get local settings
echo "Reading local settings ..."
rm -f /tmp/brew-sync.*
@letmaik
letmaik / .travis.yml
Last active December 15, 2021 23:10
Deploy snapshots to Sonatype after Travis CI build
language: java
env:
global:
- SONATYPE_USERNAME=yourusername
- secure: "your encrypted SONATYPE_PASSWORD=pass"
after_success:
- python addServer.py
- mvn clean deploy --settings ~/.m2/mySettings.xml
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2: