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 / gist:d928b61f69d65ac7bd4e
Last active August 29, 2015 14:04
Install twice...
C:\>choco install ruby -version 1.9.3.54500
Chocolatey (v0.9.8.27) is installing 'ruby' and dependencies. By installing you accept the license for 'ruby' and each dependency you are ins
talling.
ruby v1.9.3.54500
Downloading ruby 32 bit
from 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-1.9.3-p545.exe?direct'
Installing ruby...
ruby has been installed.
ruby has finished successfully! The chocolatey gods have answered your request!
@ferventcoder
ferventcoder / FindDefaultProvider.rb
Last active August 29, 2015 14:05
Puppet - Find the default provider on a machine
#in irb/pry:
require 'puppet'
Puppet::Type.type(:package).new(:name => "x").provider.class
@ferventcoder
ferventcoder / PoshGitSlowness.sh
Last active August 29, 2015 14:05
PoshGit slowness... :pandaface:
C:\code\puppetlabs\puppet [puppet-4]> git gc
Counting objects: 179307, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (42038/42038), done.
Writing objects: 100% (179307/179307), done.
Total 179307 (delta 134550), reused 178210 (delta 133549)
Removing duplicate objects: 100% (256/256), done.
Checking connectivity: 179307, done.
C:\code\puppetlabs\puppet [puppet-4]> git checkout master
Switched to branch 'master'
@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'] }
],
} ->
@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 / 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
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 / 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':
@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?