Skip to content

Instantly share code, notes, and snippets.

Avatar

Ethan J. Brown Iristyle

  • Puppet, Inc.
  • Portland, OR
View GitHub Profile
View json-polyfill.ps1
function ConvertFrom-JsonString
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true, ValueFromPipeline=$true)]
[string]
$Json
)
Add-Type -AssemblyName System.Web.Extensions
View Query_Git_Jira_Commands.sh
git log 3.6.0-rc...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
@Iristyle
Iristyle / gist:d3b69e8d0a7657a069c3
Created Jun 9, 2014 — forked from joshcooper/gist:8946913
Run Ruby specs under Windbg
View gist:d3b69e8d0a7657a069c3
set _ORIGINAL_GEM_PATH=
set BUNDLE_BIN_PATH=c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.4/bin/bundle
set BUNDLE_GEMFILE=c:/work/puppet/Gemfile
set GEM_HOME=c:/work/puppet/vendor/cache/ruby/1.9.1
set GEM_PATH=
set RUBYOPT=-Ic:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.4/lib -rbundler/setup
"ruby.exe" "C:\work\puppet\vendor\cache\ruby\1.9.1\bin\rspec" -r yarjuf -f JUnit -o result.xml -fp spec
@Iristyle
Iristyle / Crashlog.txt
Created Jul 11, 2014
MacBook Pro Sleep / Wake Failure
View Crashlog.txt
Date/Time: 2014-07-10 23:03:53 -0700
OS Version: 10.9.4 (Build 13E28)
Architecture: x86_64
Report Version: 18
Event: Sleep Wake Failure
Steps: 78
Hardware model: MacBookPro10,1
Active cpus: 8
@Iristyle
Iristyle / setup-cmd-service.ps1
Created May 5, 2015
Run cmd.exe / powershell.exe in an interactive service
View setup-cmd-service.ps1
cinst rktools.2003
cd 'C:\Program Files (x86)\Windows Resource Kits\Tools'
$serviceName = 'Interactive SYSTEM cmd'
.\instsrv.exe $serviceName 'C:\Program Files (x86)\Windows Resource Kits\Tools\srvany.exe'
sc.exe config $serviceName depend= UI0Detect start= demand
$servicePath = "HKLM:\SYSTEM\CurrentControlSet\Services\$serviceName"
$serviceParams = New-Item $servicePath -Name Parameters
@Iristyle
Iristyle / cygwin.md
Last active Aug 29, 2015
Cygwin environment differences
View cygwin.md

Cygwin Missing

APPDATA=C:\Users\Administrator\AppData\Roaming
CLIENTNAME=Zachs-MacBook-P
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
FP_NO_HOST_CHECK=NO
LOCALAPPDATA=C:\Users\Administrator\AppData\Local
@Iristyle
Iristyle / Directory Contents
Created Jun 23, 2015
Ruby MOF parsing text
View Directory Contents
[parser-tests] ls -l 17:18:43
total 1584
-rw-------+ 1 Iristyle staff 13004 May 12 15:52 DscCore.mof
-rw-------+ 1 Iristyle staff 5700 May 12 15:52 DscCoreConfProv.mof
-rw-r--r--+ 1 Iristyle staff 128 Jun 22 15:15 Gemfile
-rw-r--r--+ 1 Iristyle staff 610 Jun 22 15:16 Gemfile.lock
-rwx------+ 1 Iristyle staff 2000 May 12 15:52 MSFT_FileDirectoryConfiguration.Schema.mof
-rw-r-----@ 1 Iristyle staff 357 Jun 22 15:45 MSFT_Qualifiers.mof
-rw-r--r--+ 1 Iristyle staff 560 Jun 22 15:16 MSFT_xADDomain.schema.mof
-rw-r--r--+ 1 Iristyle staff 463 Jun 22 15:16 MSFT_xADDomainController.schema.mof
@Iristyle
Iristyle / acls.txt
Last active Aug 29, 2015
MCO sync / service startup failure
View acls.txt
Initial Permissions after installation
PS C:\Users\Administrator> get-acl C:\ProgramData\PuppetLabs\mcollective | select *
PSPath : Microsoft.PowerShell.Core\FileSystem::C:\ProgramData\PuppetLabs\mcollective
PSParentPath : Microsoft.PowerShell.Core\FileSystem::C:\ProgramData\PuppetLabs
PSChildName : mcollective
PSDrive : C
PSProvider : Microsoft.PowerShell.Core\FileSystem
View Microsoft.PowerShell_profile.ps1
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)
# Load posh-hg module from current directory
#Import-Module .\posh-hg
# If module is installed in a default location ($env:PSModulePath),
# use this instead (see about_Modules for more information):
Import-Module posh-hg
# Set up a simple prompt, adding the hg prompt parts inside hg repos
@Iristyle
Iristyle / .hgignore
Created Oct 3, 2011
Standard Mercurial Ignore file for .NET
View .hgignore
syntax: glob
*.*scc
*.FileListAbsolute.txt
*.aps
*.bak
*.[Cc]ache
*.clw
*.eto
*.exe
You can’t perform that action at this time.