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 / 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 / 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 / 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 / notes.md
Created June 30, 2014 20:50
Pry on Windows
  • It works
  • It does not like a console screen buffer height over 300.
(PUP-2389) Add ruby 2.0.0-x64
- Removed Tcl/Tk (10MB and not included as part of the standard install)
- Removed generated docs for gems (9 MB)
- Removed the following gems:
* win32-api (KEEP FOR NOW)
* windows-pr (KEEP FOR NOW)
* win32console (KEEP FOR NOW)
* windows-api (COMES with windows-pr)
- THINKING ABOUT - Removed gem cache (9 MB)
@ferventcoder
ferventcoder / Acl_Defaults_for_normal.pp
Last active August 29, 2015 14:02
ACL Remove with optional elements
# This is what the defaults look like for normal permissions.
acl { 'c:/temp':
permissions => [
{ identity => 'Administrator', rights => ['full'] },
# same as the below
{ identity => 'Administrator', rights=> ['full'], type => 'allow',child_types => 'all', affects => 'all'}
]
}
@ferventcoder
ferventcoder / Asbstract - DevOps: Your Infrastructure Just got Chocolatey.md
Created May 21, 2014 18:31
DevOps: Your Infrastructure Just got Chocolatey

Chocolatey is a global PowerShell execution engine that serves as a machine package manager for Windows. What does that mean? I'm not sure but it does some really cool stuff.

Script out your software and configuration requirements for your entire infrastructure and then version it. If you've been on the Windows side too long, you've been missing out on all the automation fun.

Kids love it. Microsoft Approved! Chocolatey definitely does some cool things like save you time and make you look uber smart for using it. Come see what this thing is and what it can do for you.

"Sometimes it's the tools that make the man." -Rob Reynolds, like 2 seconds ago

@ferventcoder
ferventcoder / Query_Git_Jira_Commands.sh
Last active July 15, 2016 02:39
3.6.0 commits JIRA curl jira api
git log 3.5.1...HEAD --pretty=format:"%h %s [%an (%ae)]" --no-merges > git.commits.txt
#| grep -v -e "(maint)" -e "(Maint)"
cat git.commits.txt | pbcopy
curl --output "jira.issues.txt" --silent -H "Content-Type: application/json" https://tickets.puppetlabs.com/rest/api/2/search?jql=project=PUP+AND+fixVersion=%223.6.0%22+Order+by+key+ASC&maxResults=300&fields=key,summary
# brew install jq
cat jira.issues.txt | jq '.issues[].key' >jiraissues.txt
# https://gist.githubusercontent.com/hlindberg/9520023/raw/40389c4c20ef3aba939c52db8f280f2ae1c0759a/ticketmatch.rb
ruby ticketmatch.rb
exec { 'powershell_system32':
command => 'c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -Command "get-process powershell* | %{ Write-Host $($_.Path)}"',
logoutput => true,
} ->
exec { 'powershell_sysnative':
command => 'c:\windows\sysnative\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -Command "get-process powershell* | %{ Write-Host $($_.Path)}"',
logoutput => true,
}
@ferventcoder
ferventcoder / gist:11231331
Created April 23, 2014 20:32
DevOps talk
Vagrant installer https://forge.puppetlabs.com/skoblenick/vagrant