Skip to content

Instantly share code, notes, and snippets.

View ferventcoder's full-sized avatar
🎯
Focusing

Rob Reynolds ferventcoder

🎯
Focusing
View GitHub Profile
@ferventcoder
ferventcoder / ModernWinOps.md
Last active April 6, 2016 01:03
Abstract for Velocity - Automating Your Windows Infrastructure With Chocolatey and Puppet

Operations management on Windows sometimes feels like the wild west. There are lots of options out there that may sort of meet your needs, but not always do the best job. The most flexible approach to modernizing operations on Windows is to look to artifact independent packages that can be added to any configuration management approach.

Once you get a taste, it's like an obsession. Chocolatey is a sweet package manager for Windows. Puppet is the Configuration Manager. Put them together and you have a super power to deliver better solutions faster. Puppet and Chocolatey have been used successfully in organizations, from large to small, to transform development and operations on Windows. You may have used and/or presently use one or both of these. Come to learn how things have changed, where the future lies, and how you can be a part of it. The future is now.

@ferventcoder
ferventcoder / ChocoInternalHost.sh
Last active March 26, 2016 18:08
Automatic Variables In PowerShell - Attempting to detect differences between PowerShell and System.Management.Automation Custom PowerShell Host
$$ = ''
$? = 'True'
$^ = ''
$_ = ''
$args = ''
$ConfirmPreference = 'High'
$ConsoleFileName = ''
$CurrentlyExecutingCommand = ''
$DebugPreference = 'Continue'
$Error = ''
@ferventcoder
ferventcoder / error.txt
Created March 21, 2016 13:58 — forked from scowalt/error.txt
Chocolatey error
Chocolatey is running on Windows v 10.0.14286.0
Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
Command line: "C:\ProgramData\chocolatey\choco.exe" install -y eraser --debug --verbose
Received arguments: install -y eraser --debug --verbose
NOTE: Hiding sensitive configuration data! Please double and triple
check to be sure no sensitive data is shown, especially if copying
output to a gist for review.
Configuration: CommandName='install'|
@ferventcoder
ferventcoder / ChocoTabExpansion.ps1
Created March 20, 2016 15:16
Chocolatey Tab Expansion
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
@ferventcoder
ferventcoder / RubyStack.ps1
Last active April 5, 2018 17:48
Full Ruby Stack Install using Chocolatey and PowerShell
# https://github.com/chocolatey/choco/wiki/CommandsReference#how-to-pass-options--switches
# Powershell specific argument passing
# You must be on the latest beta of chocolatey for this to work properly (redownload files)
choco upgrade chocolatey -pre
$originalPath = $env:PATH
choco install ruby --version 1.9.3.55100 -my --install-arguments '/verysilent /dir=""c:\tools\ruby193"" /tasks=""assocfiles""' --override-arguments
# DevKit for Ruby 1.x

Once you get a taste, it's like an obsession. Chocolatey is the package manager for Windows. Puppet is the Configuration Manager. Put them together and you have a super power to deliver better solutions faster. Puppet and Chocolatey have been used successfully in organizations, from large to small, to transform development and operations on Windows. You may have used and/or presently use one or both of these. Come to learn how things have changed, where the future lies, and how you can be a part of it. The future is now.

@ferventcoder
ferventcoder / Vagrantfile.rb
Last active January 21, 2016 21:52
For 1.7.4
# somewhere around line 81 in https://github.com/chocolatey/chocolatey-test-environment/blob/master/Vagrantfile
config.vm.provision :shell, :path => "shell/PrepareWindows.ps1" #, :powershell_elevated_interactive => true
config.vm.provision :shell, :path => "shell/InstallNet4.ps1" #, :powershell_elevated_interactive => true
config.vm.provision :shell, :path => "shell/InstallChocolatey.ps1" #, :keep_color => true, :powershell_elevated_interactive => true
config.vm.provision :shell, :path => "shell/NotifyGuiAppsOfEnvironmentChanges.ps1" #, :powershell_elevated_interactive => true
# [..snip..]
config.vm.provision :shell, :inline => $packageTestScript #, :powershell_elevated_interactive => true
@ferventcoder
ferventcoder / PackageFailingRequirements.md
Created December 1, 2015 16:04
Here's an example of the package validator in action. It's validating a package that has been submitted.
Requirements

When a package version has failed requirements, the package version requires fixing or response by the maintainer. If items are flagged correctly, they must be fixed before the package version can be approved. The exact same version should be uploaded during moderation review.

  • If you are going to fill in copyright, please use more than 4 characters.
  • Tags (tags) are space separated values for referencing categories for software. Please don't use comma to separate tags.
Guidelines

Guidelines are strong suggestions that improve the quality of a package version. These are considered something to fix for next time to increase the quality of the package. Over time guidelines can become requirements. A package version can be approved without addressing guideline comments but will reduce the quality of the package.

  • The nuspec has been enhanced to allow you to put in packageSourceUrl, pointing to the url where this package source resides. Consider adding it to the nuspec.
@ferventcoder
ferventcoder / Latest_Chocolatey_Version.ps1
Created November 30, 2015 19:32
Get Latest Version of Chocolatey from a NuGet OData Endpoint
$versionUrl = 'http://[NuGetEndpoint]/Packages()?$filter=((Id%20eq%20%27chocolatey%27)%20and%20(not%20IsPrerelease))%20and%20IsLatestVersion'
$downloader = new-object System.Net.WebClient
$downloader.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;
Write-Output "Querying latest package from $url"
[xml]$pkg = $downloader.DownloadString($versionUrl)
$latestPackageVersionUrl = $pkg.feed.entry.content.src
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",