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
FROM ubuntu:18.04 | |
# There is no official Ubuntu-18-based image for Python in Вocker Hub. | |
# But using Ubuntu 18 as a base (for everything that can't run in Alpine) is a requirement from SEC team. | |
# So we compile Python into Ubuntu-18 image ourselves | |
ENV PYTHON_VERSION 3.7.7 | |
ENV PYTHON_PIP_VERSION 20.1 | |
ENV DEBIAN_FRONTEND=noninteractive |
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
# Before you start: register at Rosetta website (http://boinc.bakerlab.org/rosetta/join.php) and remember your registration email and password | |
sudo -i | |
# install dependencies: | |
apt -qqy update && apt install -y --auto-remove libsm6 libxext6 libnotify-bin libcurl3 && apt -qqy clean | |
# Install BOINC: | |
cd /opt | |
wget -q https://boinc.berkeley.edu/dl/boinc_7.4.22_x86_64-pc-linux-gnu.sh -O boinc.sh |
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
// This example lists all job that were started on Jul 16, 2019 between 1:20 PM and 2:30 PM | |
String df = 'MMM dd, yyyy h:mm a' | |
long startTimestamp = Date.parse(df, 'Jul 16, 2019 1:20 PM').getTime() | |
long endTimestamp = Date.parse(df, 'Jul 16, 2019 2:30 PM').getTime() | |
Jenkins.instance.getAllItems(AbstractItem.class).each { | |
builds = it.getBuilds().byTimestamp(startTimestamp, endTimestamp) | |
if(!builds.isEmpty()) { |
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 | |
HELP_MSG="This script read the AWS credentials from the execution environment, get the docker-login scring by the AWS-CLI utility, creates the k8s secret with | |
this docker-login and add it as a a part of "imagePullSecrets" option to the 'default' serviceaccounts in all k8s namespaces.\n | |
Available arguments: '-s' for the name of the ECR secret will add, '-p' for the patchstring, '-h' for this message." | |
while getopts :r:p:s:a:h: option | |
do | |
case "${option}" | |
in |
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 | |
HELP_MSG="This script read the AWS credentials from the execution environment and does the docker-login via the AWS-CLI utility.\n | |
Available arguments: '-s' for the name of the ECR secret will add, '-p' for the profile, '-h' for this message." | |
while getopts :r:p:h: option | |
do | |
case "${option}" | |
in | |
r) AWS_REGION="$OPTARG";; |
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 jenkins.model.Jenkins | |
import jenkins.model.JenkinsLocationConfiguration | |
String jobNameRegexp = ".*" | |
long maxThresholdDays = 60; // days | |
boolean ignoreDisabledJobs = true | |
def getLastBuildTime(Job job) { | |
def lastBuild = job.getLastBuild() | |
if(lastBuild == null) { |
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
sudo -i | |
apt-get -y install curl | |
useradd dyaroslavtsev -m -d /home/dyaroslavtsev -s /bin/bash | |
echo "dyaroslavtsev ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | |
mkdir -p /home/dyaroslavtsev/.ssh | |
curl -sL https://goo.gl/jS8729 > /home/dyaroslavtsev/.ssh/authorized_keys | |
chown -R dyaroslavtsev:dyaroslavtsev /home/dyaroslavtsev |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeh9PfEk8w+uEfw5Om4vkGVAaYG8G1NSDCwi13i8XYY8xlMFPHMtu+Wo9hmndvJmZAGEa2nMdhRZL0HxL+YQUWlScWnfz5CSh30di3vdojWBHPGbb4aTQm3UuxJHUuwoPeN79UUshW2RPcX7Mv+9RIU1sCc0YDYAsmbtpOrZ3YZMtQXxp87lv865voAbkoA+/SEDf6hVRFvOM8+qVajIrkCRGkXe2yEsJFNn2enTcxb3MveLGPZZeqiXGohDmn7JKl4NpMpmAGDeugeSWdJuzRtN/c8wKvxLZ6sPqp1sCctIvfsq85vKx3G5zcfjNvQ1xRyXDgtpfIngtkTmt5XZvV |
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
{ | |
"order": 0, | |
"template": "metrics-spark-*", | |
"settings": { | |
"index": { | |
"number_of_shards": "3", | |
"number_of_replicas": "1", | |
"refresh_interval": "15s" | |
} | |
}, |
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 | |
AWS_ACCOUNT_ID=<ENTER_YOUR_ACCOUNT_ID_HERE> | |
REGION=us-west-2 | |
ORPHANED_SNAPSHOTS_COUNT_LIMIT=10 | |
WORK_DIR=/tmp |
NewerOlder