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 / xpath.pp
Last active August 29, 2015 14:10
XPATH type/provider
xpath { 'fragment-name':
target => 'c:/some/filepath.xml',
xpath => '//somewhere/down/the/path[@id="one"]',
value => 'two',
validate_exists => true,
}
@ferventcoder
ferventcoder / chocolateyInstall.ps1
Created November 17, 2014 14:46
Velocity Package
$packageName = 'velocity'
$installerType = 'msi'
$packageVersion = '1.0.4'
$url = "https://velocity.blob.core.windows.net/downloads/VelocitySetup-$($packageVersion).msi"
$silentArgs = '/qn'
$checksum = '_YOUR_CHECKSUM_HERE_'
$checksumType = 'MD5'
$validExitCodes @(0,3010)
@ferventcoder
ferventcoder / gist:2a471757826dfe600767
Created October 27, 2014 04:10
Hacker News Chocolatey
https://news.ycombinator.com/item?id=8513763
@ferventcoder
ferventcoder / Checklist.md
Last active August 29, 2015 14:08
Package Moderation Checklist
  1. Is the package named appropriately?
  2. Is the title appropriate?
  3. Does it have all the links? ProjectUrl at the very least.
  4. Is the description sufficient to explain the software?
  5. Are the authors pointed to the actual authors and not the package maintainers?
  6. Does the package look generally safe for consumption?
  7. Are links in the package to download software using the appropriate location?
  8. Does the package generally meet the guidelines set forth?
  9. Does the install and uninstall scripts make sense or are there variables being used that don't work?
  10. Does the package actually work?
@ferventcoder
ferventcoder / chocolateyserver.pp
Last active August 29, 2015 14:07
ChocolateyServer
$chocolatey_server_location = 'C:\tools\chocolatey.server'
$chocolatey_server_app_pool_name = 'chocolatey.server'
$chocolatey_server_app_port = '80'
# add windows features
windowsfeature { 'Web-WebServer':
installmanagementtools => true,
} ->
windowsfeature { 'Web-Asp-Net45':
c:\tools\ruby213\bin>ruby --version
ruby 2.1.3p242 (2014-09-19 revision 47630) [x64-mingw32]
c:\tools\ruby213\bin>gem --version
2.2.2
c:\tools\ruby213\bin>gem install facter --remote --clear-sources --source https://staging.rubygems.org
ERROR: Could not find a valid gem 'facter' (>= 0), here is why:
Unable to download data from https://staging.rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://staging.rubygems.org/latest_specs.4.8.gz)
@ferventcoder
ferventcoder / 1.ketarinupdater.cmd
Last active August 29, 2015 14:07
Choco updater scripts
@echo off
SET DIR=%~dp0%
@PowerShell -NoProfile -NoLogo -ExecutionPolicy Unrestricted -Command "& '%DIR%chocolateyautomaticpackages.ps1'"
set logdate=
set logtime=
::http://stackoverflow.com/questions/203090/how-to-get-current-datetime-on-windows-command-line-in-a-suitable-format-for-us
@ferventcoder
ferventcoder / shellshockfix.pp
Created September 25, 2014 18:01
Okay, kind of - there are packages that have bash bundled like git for windows... so...
package { 'bash':
ensure => latest,
}
@ferventcoder
ferventcoder / acllockdown.pp
Last active August 29, 2015 14:06
Locking down a folder for IIS
acl { "${chocolatey_server_location}":
purge => true,
inherit_parent_permissions => false,
permissions => [
{ identity => 'Administrators', rights => ['full'] },
{ identity => 'IIS_IUSRS', rights => ['read'] },
{ identity => 'IUSR', rights => ['read'] },
{ identity => "IIS APPPOOL\\${chocolatey_server_app_pool_name}", rights => ['read'] }
],
} ->