Skip to content

Instantly share code, notes, and snippets.

#---------------------------------------------------------------------
#
# Parse the response from Sonatype Nexus in order to determine the
# correct URI for the most recent snapshot of an artifact.
#
# Usage:
# ruby get_latest_snapshot.rb \
# -n http://localhost:8080/nexus \
# -g uk.co.scattercode \
# -a my-artifact \
// vim: set fenc=utf-8 ts=2 sts=2 sw=2 :
import jenkins.model.Jenkins
import groovy.json.JsonBuilder
def jenkins = Jenkins.instance
def ret = [:]
jenkins.items.each {item ->
def list = []
item.builds.each {build ->
list.add(
#!/bin/sh
#
# gpgedit: edit an encrypted file with an associated list of recipients
#
# $ gpgedit secrets.gpg [gpg args]
#
# gpgedit needs the companion file "secrets.rcp" to exist, and contains a list
# of intended recipients, one per line. The recipient file can contain end-of-
# line comments, starting with the "#" character.
@actionjack
actionjack / README.md
Last active August 29, 2015 14:27 — forked from keymon/README.md
GNU plot ab performance and CPU for a tsuru installation

AB benchmark and plotting

Small script to execute a apache benchmark ab from one host to other.

The scripts are designed for benchmark tsuru routers, and compare between hipache+nginx vs. vulcand.

It will gather metrics of request time and CPU in the target so they can be later plot using gnuplot.

@actionjack
actionjack / laughing-man.svg
Last active September 17, 2015 10:59 — forked from johan/laughing-man.svg
The Laughing Man (Ghost in the Shell), 1000 byte SVG :-)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@actionjack
actionjack / runner.sh
Created October 9, 2015 09:06
Ruby Rakefile script to simulate a CPU load on a system. Took 1 minute to run on the AWS t1.micro instance for comparison.
#!/bin/bash
# If you have n processors you might want to add a bash loop to create that many processes:
# e.g. for 4 processors
for i in 1 2 3 4; do
rake -f simulate-cpu-load.rake simulate:cpuload &
done
wait
@actionjack
actionjack / run_long_process_in_background.rb
Created October 14, 2015 07:53 — forked from ChengLong/run_long_process_in_background.rb
Run Background Process in Sinatra
require 'sinatra'
get '/long_process' do
child_pid = Process.fork do
# hard work is done here...
sleep 10
Process.exit
end
@actionjack
actionjack / README.md
Created October 30, 2015 10:57 — forked from keymon/README.md
Simple bash script to wire up Grafana 2.x with InfluxDB 0.8

Simple bash script to wire up Grafana 2.x with graphite and add dashboards

This Bash script exposes a few functions to create a Grafana data source, like graphite.

Also allows to upload some dashboards.

Usage

@actionjack
actionjack / concourse-example-tasks.md
Created November 25, 2015 11:42 — forked from drnic/concourse-example-tasks.md
A simple concourse example task - fork and try anything

Concourse Tutorial - Example Tasks

This gist includes some https://concourse.ci job tasks

  • hello-world.yml - displays "hello world"
  • display-other-task.yml - uses this task as a resource itself and displays the hello-world.yml YAML; assumes that the gist is available in the concourse pipeline as resource-gist.
  • display-other-task-renamed-resource-input.yml - is like the task above, but assumes the resource is now named gist rather than resource-gist
@actionjack
actionjack / Procfile
Created January 13, 2016 12:49 — forked from jordansissel/Procfile
Jenkins on Heroku
# Only listen on http; disable ajp and https
web: java -jar jenkins.war --httpPort=$PORT --ajp13Port=-1 --httpsPort=-1