This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; -*- mode: clojure; -*- | |
; vim: filetype=clojure | |
(logging/init) | |
(repl-server {:host "127.0.0.1" :port 55554}) | |
(let [host "0.0.0.0"] | |
(tcp-server {:host host :port 55555}) | |
(udp-server {:host host :port 55555}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[appservers:children] | |
datacenter-1 | |
datacenter-2 | |
[datacenter-1] | |
appservers00[1:3].datacenter-1.example.com | |
[datacenter-2] | |
appservers00[1:3].datacenter-2.example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execve("/usr/bin/docker", ["docker", "pull", "java:latest"], [/* 38 vars */]) = 0 | |
brk(0) = 0x1baa000 | |
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f18e08a7000 | |
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
open("/etc/ld.so.cache", O_RDONLY) = 3 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=46557, ...}) = 0 | |
mmap(NULL, 46557, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18e089b000 | |
close(3) = 0 | |
open("/lib64/libpthread.so.0", O_RDONLY) = 3 | |
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340]\200\3112\0\0\0@\0\0\0\0\0\0\0\250/\2\0\0\0\0\0\0\0\0\0@\0008\0\t\0@\0)\0(\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\200\3112\0\0\0@\0\200\3112\0\0\0\370\1\0\0\0\0\0\0\370\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0000\30\1\0\0\0\0\0000\30\201\3112\0\0\0000\30\201\3112\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\200\3112\0\0\0\0\0\200\3112\0\0\0\360m\1\0\0\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# unbind C-b if you prefer using screen's ^a command sequence | |
# set -g prefix C-a | |
# alt-arrow bindings to switch windows | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U | |
bind -n M-Down select-pane -D | |
# get visual notifications of activity from other windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Wanting to pass events by host/service, if state changed and consistent for `len-run` events | |
; modified changed-state macro to use runs | |
(defmacro stable-changed-state | |
"Passes on changes in state for each distinct host and service." | |
[len-run & children] | |
`(by [:host :service] | |
(runs ~len-run | |
(changed :state ~@children)))) | |
(def send-alert #(debug "WOULD ALERT ON" %)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.management.*; | |
def threadBean = ManagementFactory.getThreadMXBean(); | |
def osBean = ManagementFactory.getOperatingSystemMXBean(); | |
println "\n\n\n[Checking state of (master)]"; | |
println "Current CPU Time used by Jenkins: " + threadBean.getCurrentThreadCpuTime() + "ns"; | |
double processLoad = (osBean.getProcessCpuLoad() * 100).round(2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Switch between different installed Java VMs in a Debian based system | |
# | |
available=( $(update-alternatives --list java) ) | |
if [ -n "${1}" ]; then | |
case "${1}" in | |
/*bin/java) | |
VM="${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Rename screenshots into a format Jira won't complain about.. ;P | |
# | |
SCREENSHOTDIR=~/ | |
LOCKFILE=$(dirname $0)/$(basename $0).pid | |
echo "LOCKFILE: ${LOCKFILE}" | |
if [ -e ${LOCKFILE} ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Parent < ActiveRecord::Base | |
# assume there's a varchar field on the table called "name" | |
def name | |
puts "Holla from tha Parent!" | |
super | |
read_attribute(:name) || "default value!" | |
end | |
end | |
class Child < Parent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
### BEGIN INIT INFO | |
# Provides: druid_historical | |
# Required-Start: $local_fs $remote_fs $syslog $network | |
# Required-Stop: $local_fs $remote_fs $syslog $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts Druid historical service | |
# Description: start Druid historical service using start-stop-daemon | |
### END INIT INFO |
NewerOlder