https://github.com/kubernetes/dashboard/wiki/Creating-sample-user
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
# replace all print with logging module | |
import logging | |
logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(asctime)s: %(message)s') | |
logging.info('Sample logging') | |
logging.error('Sample logging') | |
logging.critical('Sample logging') |
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
# On Docker Repo Server - Run docker.io/repository:latest (docker version) | |
mkdir -p /docker_data/images # Docker images | |
mkdir -p /docker_data/certs # Repository SSL Certificate | |
# Get the hostname fqdn | |
hostname -f | |
# creating selfsign certificate | |
cd /docker_data/certs |
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
# Getting list of available updates | |
yum updateinfo list | |
# Only security patches | |
yum updateinfo list security all | |
# Update only security patches | |
yum -y update --security | |
# Update for sepcific CVE |
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 | |
BUCKET_NAME="soevm" | |
RAW_FILE_BASE="win2k-soe" | |
RAW_FILE="win2k-soe.raw" | |
UPLOAD_PAC="upload.json" | |
PARTS=7 | |
# For example for Windows 2016 iso 6.5 GB ---> 7 * 1GB | |
for i in {1..$PARTS}; do dd if=$RAW_FILE of=$RAW_FILE_BASE-$i.raw bs=1024k skip=$[i*1024 - 1024] count=1024; done |
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
# https://hub.docker.com/r/cordite/cordite/ | |
docker run -it \ | |
--memory=2048m \ | |
--cpus=2 \ | |
-e MY_LEGAL_NAME="O=Cordite-example,L=Berlin,C=DE" \ | |
-e MY_PUBLIC_ADDRESS="cordite.example.com" \ | |
-e MY_EMAIL_ADDRESS="[email protected]" \ | |
-e NETWORK_MAP_URL="https://localhost" \ | |
-v $(pwd):/opt/corda/certificates \ |
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
private static class HashFunction { | |
private long prime; | |
private long odd; | |
public HashFunction(final long prime, final long odd) { | |
this.prime = prime; | |
this.odd = odd; | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Sample definitions for restricting the access to the Jolokia agent. Adapt this | |
file and copy it over to 'jolokia-access.xml', which get's evaluated during | |
runtime (if included in the war). | |
You can restrict the available methods in principale as well as the accessible | |
attributes and operations in detail. | |
--> |
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
# Nexus | |
nexusArtifactUploader artifacts: | |
[[ artifactId: 'simple-maven-project-with-tests-1.0-${BUILD_NUMBER}', | |
classifier: 'JAR', | |
file: 'target/simple-maven-project-with-tests-1.0-SNAPSHOT.jar', | |
type: 'jar']], | |
credentialsId: 'nexus-admin', | |
groupId: 'inuit-repo-groups', | |
nexusUrl: 'localhost:8081/repository/cm2-ami-build/', |
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
rtUpload ( | |
serverId: "Artifactory-1", | |
spec: | |
"""{ | |
"files": [ | |
{ | |
"pattern": "target/*.jar", | |
"target": "my-repo/sub-folder/${BUILD_NUMBER}/" | |
}, | |
{ |