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 | |
set -e | |
if [ $# -eq 0 ]; then | |
echo "USAGE: $0 plugin1 plugin2 ..." | |
exit 1 | |
fi | |
plugin_dir=/var/lib/jenkins/plugins |
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 | |
# This script can be used as wrapper for rsync in authorized_keys. It restricts rsync the following way: | |
# - restrict target directory to be under /backups/backup-rsync-push/${1}/target/ where $1 is an argument from authorized_keys | |
# - restrict target directory to be exactly 1 level below this directory | |
# - restrict flags | |
# - restrict arguments | |
# - force --fake-super argument | |
err() { |
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 | |
# | |
# USAGE: | |
# [ -f /usr/bin/curl ] || apt-get -y install curl | |
# curl -sSL https://gist.githubusercontent.com/micw/987af53361c1d7de1369/raw/ | /bin/bash | |
set -e | |
if [ ! -f /etc/apt/sources.list.d/wheezy-backports.list ]; then | |
echo "Adding wheezy backport repository" |
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
- hosts: default | |
vars: | |
- NSCA_PASSWORD: topsecret | |
handlers: | |
- name: Restart shinken | |
service: name=shinken state=restarted | |
tasks: | |
- apt_repository: repo='deb http://http.debian.net/debian wheezy-backports main contrib' state=present update_cache=yes | |
- apt: name=python-pip | |
- apt: name=python-pycurl |
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/python | |
import fcntl | |
import time | |
import sys | |
import os | |
import yaml | |
import subprocess | |
basedir=os.path.dirname(os.path.realpath(__file__)) |
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
{ | |
status: 'OK' | |
message: 'everything is fine' | |
metrics: [ | |
{ name: 'value1', unit: '%', value: 65.7, warn: 70, crit: 90, min: 0, max:100 } | |
{ name: 'value2', value: 10, min: 5, max:15 } | |
] | |
} |
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
package testutils.mvc; | |
import static org.mockito.Matchers.anyString; | |
import javax.servlet.Filter; | |
import javax.servlet.RequestDispatcher; | |
import javax.servlet.Servlet; | |
import javax.servlet.ServletRequest; | |
import javax.servlet.ServletResponse; | |
import javax.servlet.http.HttpServletRequestWrapper; |
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/ruby | |
hash=eval(ARGV[0]) | |
hash.each do |key, value| | |
puts "["+key+"]" | |
value.collect do |host| | |
puts host+" ansible_connection=local" | |
end | |
puts | |
end |
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
#include <ESP8266WiFi.h> | |
#include <WiFiUdp.h> | |
#include <PacketSerial.h> | |
boolean initialized; | |
PacketSerial serial; | |
WiFiUDP Udp; |
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 static org.hamcrest.MatcherAssert.*; | |
import static org.hamcrest.Matchers.*; | |
import org.junit.Test; | |
public class TestTheAnswerToTheUltimateQuestionOfLifeTheUniverseAndEverything | |
{ | |
final int LEET = 1337; | |
final double PI = Math.PI; |
OlderNewer