Skip to content

Instantly share code, notes, and snippets.

View ferventcoder's full-sized avatar
🎯
Focusing

Rob Reynolds ferventcoder

🎯
Focusing
View GitHub Profile
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$psFileFullPath = Join-Path $toolsDir "ps1crash.ps1"
Install-BinFile `
-Name ps1crash `
-Path "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" `
-Command "-NoProfile -ExecutionPolicy unrestricted -Command `"&'$psFileFullPath' %*`""
@ferventcoder
ferventcoder / NonAdmin.cmd
Last active May 6, 2024 22:08
Installing Software as a Non-Administrator Using Chocolatey
:: Pick one of these two files (cmd or ps1)
:: Set directory for installation - Chocolatey does not lock
:: down the directory if not the default
SET INSTALLDIR=c:\ProgramData\chocoportable
setx ChocolateyInstall %INSTALLDIR%
:: All install options - offline, proxy, etc at
:: https://chocolatey.org/install
@powershell -NoProfile -ExecutionPolicy Bypass -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH="%PATH%;%INSTALLDIR%\bin"
@ferventcoder
ferventcoder / get-input.ps1
Last active May 14, 2022 02:47
Testing PowerShell Fuzzy Parameter matching
function Get-Input {
[CmdletBinding()]
param (
[string]$abcdef = 'exe',
[parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
)
$invocaton = $MyInvocation
$argumentsPassed = ''
foreach ($param in $PSBoundParameters.GetEnumerator()) {
$argumentsPassed += "-$($param.Key) '$($param.Value -Join ' ')' "
@ferventcoder
ferventcoder / _README.md
Last active October 27, 2016 16:42
FireFox override install directory

Make sure you set up the directory like this:

firefox
 | - firefox.nuspec
 | - tools
     | - chocolateyInstall.ps1
     | - firefox.ini
     | - 32bitinstaller.exe
 | - 32bitinstaller.exe.ignore (shim director, empty file that bears exact name of exe with `.ignore` appended)
@ferventcoder
ferventcoder / entire_chocolatey_setup.pp
Last active September 24, 2021 07:44
Setting up and configuring Chocolatey with Puppet
case $operatingsystem {
'windows': {
Package {
provider => chocolatey,
}
}
}
# ensure Chocolatey is installed - host the package internally
class {'chocolatey':
@ferventcoder
ferventcoder / releaseticket.rb
Created July 15, 2016 02:30 — forked from kylog/releaseticket.rb
One-off script to create a puppet release ticket
#!/usr/bin/env ruby
require 'jira'
require 'pp'
require 'getoptlong'
# default values
username = "gepetto-bot"
password = ENV["GEPETTO_BOT_PASSWORD"]
@ferventcoder
ferventcoder / MidwestIO_Abstract.md
Created May 5, 2016 22:53
Software Management on Windows - Controlling the Chaos with Chocolatey

Automating software management is simple on almost every platform except Windows. Windows has many different routes to procure software with over 20 installer types and archive formats! This really makes managing software on Windows trend towards chaos.

Enter Chocolatey - the package manager for Windows. Chocolatey is a single, unified interface designed to easily work with all aspects of managing Windows software using a packaging framework that understands both versioning and dependency requirements. Chocolatey packages encapsulate everything required to manage a particular piece of software into one deployment artifact by wrapping installers, executables, zips, and scripts into a compiled package file. Chocolatey integrates with your favorite Configuration Management platforms, whether it is Puppet, Chef, SCCM, PowerShell DSC, Ansible, or Saltstack.

Come learn how to let Chocolatey wrangle the chaos of Windows software management and leave you with a smile on your face!

@ferventcoder
ferventcoder / settings.json.txt
Last active May 4, 2016 20:06
Visual Studio Code User Settings
// Place your settings in this file to overwrite the default settings
{
// The default end of line character.
"files.eol": "\n",
// When enabled, will trim trailing whitespace when you save a file.
"files.trimTrailingWhitespace": true,
// Controls auto save of dirty files. Accepted values: "off", "afterDelay", "onFocusChange". If set to "afterDelay" you can configure the delay in "files.autoSaveDelay".
"files.autoSave": "onFocusChange",
@ferventcoder
ferventcoder / PuppetConf2016Abstract.md
Last active May 2, 2016 20:58
PuppetConf 2016 Abstract - Easily Manage Software on Windows with Chocolatey

Easily Manage Software on Windows with Chocolatey

Automating software management is simple on almost every platform except Windows. Windows has many different routes to procure software with over 20 installer types and archive formats! This really makes managing software on Windows trend towards chaos.

Enter Chocolatey - the package manager for Windows. Chocolatey is a single, unified interface designed to easily work with all aspects of managing Windows software using a packaging framework that understands both versioning and dependency requirements. Chocolatey packages encapsulate everything required to manage a particular piece of software into one deployment artifact by wrapping installers, executables, zips, and scripts into a compiled package file.

Come learn how to let Chocolatey wrangle the chaos of Windows software management and leave you with a smile on your face!

@ferventcoder
ferventcoder / PowerShellHelpDirectivesTemplate.ps1
Created April 13, 2016 11:44
PowerShell Help Directives Template
<#
.SYNOPSIS
.DESCRIPTION
.NOTES