docker images -qf dangling=true | xargs docker rmi
docker volume ls -qf dangling=true | xargs -r docker volume rm
// | |
// Companion code to https://medium.com/statuscode/pipeline-patterns-in-go-a37bb3a7e61d | |
// | |
// To run: | |
// go get github.com/pkg/errors | |
// go run -race pipeline_demo.go | |
// | |
package main |
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
package main | |
import ( | |
"encoding/json" | |
"os" | |
"reflect" | |
"text/template" | |
) |
<?xml version="1.0" encoding="UTF-8" ?> | |
<Data> | |
<Series> | |
<id>83462</id> | |
<Actors>|Nathan Fillion|Stana Katic|Molly C. Quinn|Jon Huertas|Seamus Dever|Tamala Jones|Susan Sullivan|Ruben Santiago-Hudson|Monet Mazur|</Actors> | |
<Airs_DayOfWeek>Monday</Airs_DayOfWeek> | |
<Airs_Time>10:00 PM</Airs_Time> | |
<ContentRating>TV-PG</ContentRating> | |
<FirstAired>2009-03-09</FirstAired> | |
<Genre>|Drama|</Genre> |
KEY=XXXXXXXXXXXX | |
HOST="https://metrics.crisidev.org" | |
mkdir -p dashboards && for dash in $(curl -k -H "Authorization: Bearer $KEY" $HOST/api/search\?query\=\& |tr ']' '\n' |cut -d "," -f 5 |grep slug |cut -d\" -f 4); do | |
curl -k -H "Authorization: Bearer $KEY" $HOST/api/dashboards/db/$dash > dashboards/$dash.json | |
done |
/*************************************************************************************************** | |
* Copyright (c) 2015 Rüdiger Herrmann | |
* All rights reserved. This program and the accompanying materials are made available under the | |
* terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* | |
* Contributors: | |
* Rüdiger Herrmann - initial API and implementation | |
**************************************************************************************************/ | |
package com.codeaffine.jgit.example; |
#!/bin/bash | |
sudo yum install -y python-pip | |
sudo pip install httpie | |
# |
# Install Docker on Xenial 16.04.1 x64 | |
# Ref https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
# No interactive for now. | |
export DEBIAN_FRONTEND=noninteractive | |
# Update your APT package index. | |
sudo apt-get -y update | |
# Update package information, ensure that APT works with the https method, and that CA certificates are installed. | |
sudo apt-get -y install apt-transport-https ca-certificates | |
# Add the new GPG key. | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: logstash | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start daemon at boot time | |
# Description: Enable service provided by daemon. | |
### END INIT INFO |