I hereby claim:
- I am brantone on github.
- I am brantone (https://keybase.io/brantone) on keybase.
- I have a public key whose fingerprint is 334B 1FC1 3F05 AB8C 1C61 9DBD 60B1 EBEA 766A 49A8
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| # This is a draft but it works | |
| # FIRST (I don't even know if it works but we'll assume yes) | |
| # sudo launchctl list | |
| # sudo launchctl disable system/netbiosd | |
| # sudo launchctl disable system/parsecd | |
| # sudo launchctl disable system/parentalcontrols.check | |
| # sudo launchctl disable system/airportd |
| #!/bin/bash | |
| trap ctrl_c INT | |
| function ctrl_c() { | |
| echo "** WARNING HIT CTRL^C MAKE LOSS YOUR pass.enc File **" | |
| } | |
| file="pass.txt" |
| Commands | |
| -------- | |
| Run on nodes | |
| # knife ssh "name:macOS2*" "sudo DEVELOPER_DIR=/Library/Developer/CommandLineTools/ chef-client" -x [user] -P | |
| Data Bags | |
| --------- | |
| If not already have secret key: |
| #!/usr/bin/knife exec | |
| # Knife exec script to put the contents of a file into a data bag, then encrypt it. | |
| # Care of : https://www.coveros.com/chef-knife-script-for-encrypting-a-file-a-data-bag/ | |
| ########### USAGE ############ | |
| this_file = File.basename(__FILE__) | |
| usage = <<-EOS | |
| #{this_file}: Encrypts and stores the contents of a file into a data bag item. This | |
| is typically used to encrypt and store the contents of a PEM file. | |
| node['agent']['visualstudio']['versions'].each do |vs| | |
| directory "#{Chef::Config[:file_cache_path]}\\visualstudio\\#{vs.version}\\" do | |
| action :create | |
| recursive true | |
| end | |
| remote_file "#{Chef::Config[:file_cache_path]}\\visualstudio\\#{vs.version}\\#{vs.installer}" do | |
| action :create | |
| source "#{node['agent']['software_repo_root']}/microsoft/vs#{vs.version}/#{vs.installer}" | |
| checksum vs.checksum |
| source "https://rubygems.org" | |
| gem "octokit" |
| import hudson.FilePath | |
| import jenkins.model.Jenkins | |
| import com.cloudbees.hudson.plugins.folder.* | |
| Jenkins jkns = Jenkins.instance | |
| def build_vars = build.buildVariables | |
| def base_folder_name = build_vars['baseFolderName'] | |
| def build_proj_file = 'ServerBuild.proj' | |
| def tier = (build_vars['assembliesTier'].toInteger() - 1) |
| import hudson.model.* | |
| // extract the version tag from the console log | |
| def version_pattern = ".*\\[\\s*INFO\\s*\\]\\s+VERSION=(.*)\\s*\$" | |
| def matcher = manager.getLogMatcher( version_pattern ) | |
| if ( matcher?.matches() ) { | |
| // add the version string to the job summary | |
| def ver = matcher.group(1) | |
| manager.addInfoBadge( "Version: $ver" ) |
| #!/bin/bash | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |