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
| :do { | |
| :do { | |
| /file remove "/ipsum.rsc"; | |
| /file remove "/subnet.rsc"; | |
| } on-error={} | |
| :put "Downloading ipsum.rsc..."; | |
| :do { | |
| /tool fetch url="https://antifilter.download/list/ipsum.rsc" dst-path="/ipsum.rsc" | |
| } on-error={ |
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 -e -u -x | |
| # -e / set -e / set -o errexit - exit immediately if a command exits with a non-zero status | |
| # -u / set -u / set -o nounset - treat unset variables as an error when substituting | |
| # -x / set -x / set -o xtrace - print commands and their arguments as they are executed | |
| set -o pipefail # the return value of a pipeline is the status of the last command to exit with a non-zero status | |
| workdir=$(mktemp -d) # path must be absolute, must be writable for current user | |
| echo "current working directory: ${workdir}" | |
| depsdir="${workdir%/}/ext" # all dependencies will be placed here | |
| cd ${workdir} |
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
| from collections import namedtuple | |
| import struct | |
| import sys | |
| from enum import Enum | |
| class PointSource(Enum): | |
| EAppleNative=0 | |
| EWindowsNative=1 | |
| EAndroidNative=2 | |
| EGoogle=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
| urlencode() { | |
| # urlencode <string> | |
| old_lc_collate=$LC_COLLATE | |
| LC_COLLATE=C | |
| local length="${#1}" | |
| for (( i = 0; i < length; i++ )); do | |
| local c="${1:i:1}" | |
| case $c in | |
| [a-zA-Z0-9.~_-]) printf "$c" ;; |
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 com.cloudbees.hudson.plugins.folder.Folder | |
| import hudson.model.Cause | |
| import jenkins.model.Jenkins | |
| import org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject | |
| initMultibranchJobsInFolder = { String folderPath, Closure where = { true } -> | |
| def folder = Jenkins.instanceOrNull.getAllItems(Folder).find { it.fullName == folderPath } | |
| def projects = folder.getAllItems(WorkflowMultiBranchProject).findAll(where) | |
| println("Found ${projects.size()} items in $folder.fullName") |
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 | |
| # Return reasonable JVM options to run inside a Docker container where memory and | |
| # CPU can be limited with cgroups. | |
| # https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/parallel.html | |
| # | |
| # The script can be used in a custom CMD or ENTRYPOINT | |
| # | |
| # export _JAVA_OPTIONS=$(/usr/local/bin/docker-jvm-opts.sh) |
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 com.cloudbees.hudson.plugins.folder.Folder | |
| import hudson.model.Descriptor | |
| import hudson.model.TaskListener | |
| import jenkins.model.Jenkins | |
| import org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig | |
| import org.jenkinsci.plugins.pipeline.maven.MavenDependency | |
| import org.jenkinsci.plugins.pipeline.maven.dao.PipelineMavenPluginDao | |
| import org.jenkinsci.plugins.pipeline.maven.dao.PipelineMavenPluginMonitoringDao | |
| import org.jenkinsci.plugins.pipeline.maven.publishers.MavenReport | |
| import org.jenkinsci.plugins.workflow.job.WorkflowJob |
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 com.cloudbees.hudson.plugins.folder.Folder | |
| import hudson.model.Cause | |
| import hudson.model.Job | |
| import hudson.model.Result | |
| import java.util.concurrent.Callable | |
| import java.util.concurrent.TimeUnit | |
| import java.util.concurrent.atomic.AtomicInteger | |
| import jenkins.model.Jenkins | |
| import org.jenkinsci.plugins.workflow.job.WorkflowJob | |
| import org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject |
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
| wget https://raw.githubusercontent.com/docker/docker/master/contrib/init/systemd/docker.socket -O /usr/lib/systemd/system/docker.socket | |
| systemctl daemon-reload | |
| systemctl start docker.socket | |
| systemctl start docker |
NewerOlder