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
| @panels = @servicelist.map do |service| | |
| next if service[:hidden] == "true" | |
| { | |
| title: service[:title], | |
| panel_name: __method__.to_s, | |
| icon: service[:logo], | |
| query_string: {}, | |
| id: service[:id] | |
| } | |
| 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
| openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt -subj "/CN=$HOSTNAME/O=Company/C=US" |
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
| images = [{:image_id=>"ami-04692a6c", | |
| :image_location=>"979382823631/bitnami-djangostack-1.6.4-0-dev-linux-ubuntu-12.04.4-x86_64-ebs-ami-e651b78e-3-ami-5e24a136", | |
| :state=>"available", | |
| :owner_id=>"979382823631", | |
| :creation_date=>"2015-02-03T17:30:54.000Z", | |
| :public=>true, | |
| :architecture=>"x86_64", | |
| :image_type=>"machine", | |
| :kernel_id=>"aki-919dcaf8", | |
| :name=>"bitnami-djangostack-1.6.4-0-dev-linux-ubuntu-12.04.4-x86_64-ebs-ami-e651b78e-3-ami-5e24a136", |
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
| spec = { | |
| deviceChange: [ | |
| { | |
| operation: :edit, | |
| device: RbVmomi::VIM::VirtualCdrom( | |
| key: 2, | |
| controllerKey: 200, | |
| backing: RbVmomi::VIM::VirtualCdromAtapiBackingInfo( | |
| deviceName: "" | |
| ), |
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
| # define some stuff | |
| @var1 = "hello" | |
| @var2 = { key: "stuff", value: "world" } | |
| # populate using ERB | |
| e = ERB.new( File.read('test.erb') ) | |
| e.result(binding) |
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
| a = [ | |
| { key: "key1", value: "value1" }, | |
| { key: "key2", value: "value2" } | |
| ] | |
| b = [ | |
| { key: "key3", value: "value3" }, | |
| { key: "key4", value: "value4" } | |
| ] | |
| a.push(b) |
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 | |
| usage_message=" Usage: sudo bash start-registry.sh -u [HT_USER] -p [HT_PASS]" | |
| if (($# == 0)); then | |
| echo "Missing opts." | |
| echo "$usage_message" | |
| exit 1 | |
| fi |
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
| jenkins_server='jenkins-dev.domain.net' | |
| job_name='my-new-branch-job' | |
| username='adam' | |
| curl -s -k -X POST "https://$jenkins_server/createItem?name=$job_name" \ | |
| --data-binary @config.xml \ | |
| -H "Content-Type:text/xml" \ | |
| -u $username | |
| # enter password when prompted |
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
| jenkins_server='jenkins-dev.domain.net' | |
| job_name='app-deploy' | |
| username='adam' | |
| curl -X GET -u $username -k "https://$jenkins_server/job/$job_name/config.xml" -O | |
| # prompted for password |
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
| # create private key | |
| openssl genrsa -out app.key 2048 | |
| # create config/ini file for request | |
| # generate csr | |
| openssl req -new -out app.csr -key app.key -config request.ini | |
| # issue from CA using CSR |