En tant que root
export NODE_VERSION=12.18.3
#!/bin/bash | |
vimdiff <(xmllint --c14n "$1") <(xmllint --c14n "$2") |
The Jenkins Build Status History widget periodically fetches a snapshot of build status information for a specified list of jobs on a Jenkins CI server.
As time progresses, new build status samples are added to the right, while older samples are removed from the left. This view allows you to quickly see the health of your jobs as well as any time trends.
Calls are made to the Jenkins API to retrieve the name and color properties of listed jobs in a JSON form. The color of a given job represents its current build status (i.e. "blue" => successful build, "red" => failing build and so on).
# https://atheek.wordpress.com/2012/05/29/weblogic-sql-authenticator-and-salted-hash-passwords/ | |
from hashlib import sha1 | |
from base64 import b64encode | |
def hash(password, salt): | |
sha_hashed = sha1(salt + password) | |
encoded = b64encode(sha_hashed.digest()) | |
return "{SSHA}" + salt + encoded |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.node circle { | |
fill: #fff; | |
stroke: steelblue; | |
stroke-width: 1.5px; | |
} |
#!/usr/bin/env python | |
import sys | |
import xml.etree.ElementTree as ET | |
for arg in sys.argv[1:]: | |
elements = ET.parse(arg).findall("./pom:version", {'pom': 'http://maven.apache.org/POM/4.0.0'}) | |
if len(elements) == 1: | |
print elements[0].text | |
elif len(elements) == 0: |
import sys | |
import boto | |
import boto.ec2 | |
ec2 = boto.ec2.connect_to_region('eu-west-1') | |
reservations = ec2.get_all_instances() | |
def ow_stack(instance): | |
if 'opsworks:stack' in instance.tags: | |
return instance.tags['opsworks:stack'] |
LoadingCache<String, Future<String>> cache = CacheBuilder.newBuilder() | |
.build( | |
new CacheLoader<String, Future<String>>() { | |
private int counter = 0; | |
@Override | |
public Future<String> load(final String key) { | |
++counter; | |
if (counter == 1) { | |
System.out.println("premier load"); |