Skip to content

Instantly share code, notes, and snippets.

@txag1995
txag1995 / gist:3b100cf33b2222fd54fb
Created July 29, 2015 18:58
Decode-Base64File Error
D [FileTransporter] Wrote chunk 1325 for $env:TEMP\b64-d29bab678727370508dabd697352eb8a.txt
D [FileTransporter] Wrote chunk 1350 for $env:TEMP\b64-d29bab678727370508dabd697352eb8a.txt
D [FileTransporter] Wrote chunk 1375 for $env:TEMP\b64-d29bab678727370508dabd697352eb8a.txt
D [FileTransporter] Wrote chunk 1400 for $env:TEMP\b64-d29bab678727370508dabd697352eb8a.txt
D [FileTransporter] Wrote chunk 1425 for $env:TEMP\b64-d29bab678727370508dabd697352eb8a.txt
D [FileTransporter] Wrote chunk 1450 for $env:TEMP\b64-d29bab678727370508dabd697352eb8a.txt
D [FileTransporter] Wrote chunk 1475 for $env:TEMP\b64-d29bab678727370508dabd697352eb8a.txt
D [CommandExecutor] Resetting WinRM shell (Max command limit is 1498)
D [FileTransporter] Wrote chunk 1500 for $env:TEMP\b64-d29bab678727370508dabd697352eb8a.txt
D [FileTransporter] Wrote chunk 1525 for $env:TEMP\b64-d29bab678727370508dabd697352eb8a.txt
@txag1995
txag1995 / windows_preflight.ps1
Created July 6, 2015 12:45
Connectivity Test
#Powershell pre-flight Check
#Parameters
$current_time = Get-Date -format u
$current_time = $current_time.split(" ")[0]
$outputfile = "$env:username" +"_" + "$current_time" + "_results.csv"
$results = @()
$sites = @(
'google.com',
@txag1995
txag1995 / .kitchen.yml
Created May 7, 2015 05:50
.kitchen.yml
---
driver:
name: hyperv
parent_vhd_folder: 'C:\Users\Bryan\.vagrant.d\boxes\mwrock-VAGRANTSLASH-Windows2012R2Full\0.1.0\hyperv\Virtual Hard Disks\'
parent_vhd_name: 'disk.vhd'
memory_startup_bytes: 1073741824
password: 'vagrant'
transport: winrm
@txag1995
txag1995 / chef_identity.rb
Created April 21, 2015 19:42
Chef Identity
orgs = {}
jenkins_home = node['jenkins']['master']['home']
chef_orgs.each do |org|
# Create a has with org info so we can create the chef-identity
# configuration file.
org_info = {
# 'name' => org['id'],
'key' => org['pem'],
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties>
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="[email protected]">
<projectUrl>https://github.com/txag1995/chef-repo/</projectUrl>
</com.coravy.hudson.plugins.github.GithubProjectProperty>
<hudson.model.ParametersDefinitionProperty>
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties>
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="[email protected]">
<projectUrl>https://github.com/txag1995/sample-cookbook/</projectUrl>
</com.coravy.hudson.plugins.github.GithubProjectProperty>
</properties>
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties>
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="[email protected]">
<projectUrl>https://github.com/txag1995/sample-cookbook/</projectUrl>
</com.coravy.hudson.plugins.github.GithubProjectProperty>
</properties>
@txag1995
txag1995 / SporkBump
Last active January 28, 2016 18:13
knife spork bump sample-cookbook $BUMP_LEVEL
COOKBOOK_VERSION=v`sed -n "s/^ *version *[\'\"]\(.*\)[\'\"]/\1/p" cookbooks/$JOB_NAME/metadata.rb`
echo COOKBOOK_VERSION=$COOKBOOK_VERSION >> build.properties
cd cookbooks/$JOB_NAME
if [ -b "Berksfile.lock" ]
then
berks update sample-cookbook
else
berks install
current_dir = File.dirname(__FILE__)
log_level :info
log_location STDOUT
node_name "<USERNAME>"
client_key "#{current_dir}/user.pem"
chef_server_url "https://api.opscode.com/organizations/<ORGANIZATION>"
cache_type 'BasicFile'
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
cookbook_path ["#{current_dir}/../cookbooks"]
source "https://rubygems.org"
gem "berkshelf"
group :test do
gem "chefspec"
gem "foodcritic"
gem "rubocop"
gem "guard"
gem "guard-rspec"