Skip to content

Instantly share code, notes, and snippets.

@johnrengelman
johnrengelman / build.gradle
Created April 8, 2015 13:57
Self applying Gradle plugin project
//place this content in your buildSrc/build.gradle file
//Then apply your plugin to its own build in build.gradle
import org.codehaus.groovy.control.CompilerConfiguration
apply plugin: 'groovy'
repositories {
jcenter()
}
@johnrengelman
johnrengelman / frigga.txt
Last active September 9, 2022 14:29
Netflix Frigga Naming Schema
ASG name = frigga.group = app-stack-detail(-options)-push
frigga.cluster = app-stack-detail
frigga.push = v<sequence)
options:
- c0<value> = countries
- d0<value = devPhase
- h0<value> = hardware
@johnrengelman
johnrengelman / BuildConfig.groovy
Created May 10, 2013 16:53
Grails 2.3.0.M1 Maven Repo Credentials
grails.servlet.version = "3.0" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.work.dir = "target/work"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"
forkConfig = [maxMemory: 1024, minMemory: 64, debug: false, maxPerm: 256]
@johnrengelman
johnrengelman / docker-compose.yml
Created May 9, 2016 15:56
Consul-Rancher stack
consul-registrator:
log_driver: ''
labels:
io.rancher.sidekicks: consul,consul-data
io.rancher.scheduler.global: 'true'
io.rancher.container.pull_image: always
io.rancher.container.hostname_override: container_name
tty: true
restart: always
command:
node {
// Mark the code checkout 'Checkout'....
stage 'Checkout'
// // Get some code from a GitHub repository
git url: 'git@github.com:myorg/infrastructure.git'
// Get the Terraform tool.
def tfHome = tool name: 'Terraform', type: 'com.cloudbees.jenkins.plugins.customtools.CustomTool'
var gistPrefix = 'https://gist.github.com/',
// Cache document.write so that it can be restored once all Gists have been
// embedded.
cachedWrite = document.write,
body = $('body'),
// Map each p.gist to an object that contains the paragraph to be replaced
// and the Gist's identifier.
gists = $('a.gist').map(function(n, a) {
a = $(a);
var href = a.attr('href');
@johnrengelman
johnrengelman / build.gradle
Created October 9, 2013 21:54
Deploying custom artifact with POM dependencies using Gradle 'maven-publish'
File pluginZip = project.file("grails-${project.name}-${version}.zip")
assemble.outputs.file pluginZip
project.components.add(new JavaLibrary(
new org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact(
project.name,
'zip',
'zip',
'',
new Date(pluginZip.lastModified()),
@johnrengelman
johnrengelman / build-ivy.gradle
Last active May 3, 2018 11:24
Setting Gradle to publish to BinTray
repositories {
mavenCentral()
}
apply plugin: 'maven'
apply plugin: 'groovy'
apply plugin: 'idea'
group = 'org.gradle.plugins'
version = "${currentVersion}"
@johnrengelman
johnrengelman / README.md
Created January 8, 2015 18:54
Monit Install
@johnrengelman
johnrengelman / InfluxDBMetricsModules.java
Created September 22, 2016 18:48
InfluxDB Reporter module for Ratpack
package com.peoplenet.common.ratpack.metrics
import com.codahale.metrics.MetricRegistry
import com.google.inject.Inject
import com.google.inject.Provides
import com.izettle.metrics.influxdb.InfluxDbHttpSender
import com.izettle.metrics.influxdb.InfluxDbSender
import com.izettle.metrics.influxdb.InfluxDbTcpSender
import com.izettle.metrics.influxdb.InfluxDbUdpSender
import com.peoplenet.common.ratpack.config.Application