This file contains hidden or 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 service pritunl stop | |
mongodump -d pritunl -o pritunl-bkp | |
tar -czvf pritunl-bkp.tar.gz pritunl-bkp |
This file contains hidden or 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/env bash | |
TASK=$@ | |
FAIL_CNT=0 | |
RUN= | |
TASK_PID= | |
LOOPID=1 | |
_ctl() { |
This file contains hidden or 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 | |
region=eu-central-1 | |
haproxy_url=http://haproxy.internal:5555 | |
haproxy_username=admin | |
haproxy_password=password | |
cluster_size=3 |
This file contains hidden or 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
/*** BEGIN META {"name" : "Bulk Delete Jobs", | |
"comment" : "Delete jobs disabled and where last build is older than specified param", | |
"parameters" : [ 'dryRun', 'numberOfDays', 'excludeRegexp' ], | |
"core": "2.0", | |
"authors" : [{ name : "Benjamin Francisoud" }, { name : "Aleksei Vesnin" }]} END META**/ | |
import jenkins.model.* | |
import java.util.regex.Pattern |
This file contains hidden or 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
class ClassFinder { | |
static List<Class> findClasses(Class clazz) { | |
URL srcLocation = clazz.getProtectionDomain().getCodeSource().getLocation() | |
String packageName = clazz.package.name | |
List<String> classNames | |
if (srcLocation.toString().endsWith('.jar')) { | |
String packagePath = packageName.replaceAll(/\./, '/') | |
classNames = loadClassNamesFromJar(srcLocation, packagePath) | |
} else { | |
File dir = new File(clazz.getResource('').toURI()) |
This file contains hidden or 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 json | |
import boto3 | |
import gzip | |
import base64 | |
import time | |
# AWS account ID | |
AWS_ACCOUNT_ID = "001234567890" | |
# CloudWatch log group name |
OlderNewer