This gist contains an example for creating an HAProxy reverse proxy balancing connections between any number of Jenkins master nodes, while maintaining individual user sessions across the same master.
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
| # | |
| # All credit to belongs to the original author here: | |
| # http://xn--thibaud-dya.fr/jenkins_credentials.html | |
| # | |
| # This is merely a ruby implementation of the code found here: | |
| # https://github.com/tweksteen/jenkins-decrypt/blob/master/decrypt.py | |
| # | |
| require 'openssl' | |
| require 'base64' |
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 | |
| USERNAME=${1:-"u$(date +%s)"} | |
| PASSWORD=${2:-'password'} | |
| # the CLI jar file location | |
| JENKINS_CLI_JAR=/tmp/jenkins-cli.jar | |
| # the private key to use for authenticating | |
| JENKINS_ROBOT_PRIVATE_KEY=$HOME/.ssh/devops_robot |
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
| require 'ridley' | |
| class Cookbook | |
| class DownstreamDependencyList | |
| attr_reader :target_cookbook, :target_version | |
| def initialize(cookbook, version) | |
| @target_cookbook = cookbook | |
| @target_version = version |
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
| # Build our client object | |
| client = Octokit::Client.new(:access_token => ENV['GITHUB_API_TOKEN']) | |
| # Connect and get our User object | |
| user = client.user | |
| # Get a listing of this user's personal repos | |
| user_repos = user.rels[:repos].get.data | |
| user_repos.each do |repo| | |
| puts repo.name, repo.clone_url | |
| end |
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
| k8s_docker: | |
| image: rancher/os-docker:v0.3.3 | |
| labels: | |
| io.rancher.os.scope: system | |
| io.rancher.os.after: console | |
| net: host | |
| pid: host | |
| ipc: host | |
| uts: host | |
| privileged: true |
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
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| int main() | |
| { | |
| int quantity; | |
| double total; |
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
| #include <iostream> | |
| using namespace std; | |
| int countingArray(float list[], int arraySize, bool countNegative); | |
| void countingArray(float list[], int arraySize, int &numOfNegatives, int &numOfPositives); | |
| int main() { | |
| const int arraySize = 7; |
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
| require "formula" | |
| class Srelay < Formula | |
| homepage "http://socks-relay.sourceforge.net" | |
| url "https://downloads.sourceforge.net/project/socks-relay/socks-relay/srelay-0.4.8/srelay-0.4.8b6.tar.gz" | |
| sha1 "f5002394c9447bda340831ddabf339e88eab9f24" | |
| def install | |
| system "./configure", "--disable-debug", | |
| "--disable-dependency-tracking", |
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 | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| brew install caskroom/cask/brew-cask | |
| brew cask install chefdk | |
| sudo chown -R $(whoami): /opt | |
| chef-client -z -o 'workstation::setup' |