Skip to content

Instantly share code, notes, and snippets.

statuses = []
issues.forEach (issue) ->
statuses = (x for x in issue.status)
running this I get 7 but there are dupes in the list.
I want to get something like
Status1: 4
Status2: 1
tests-Mac:boxen test$ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future ./script/boxen
Boxen has a dirty tree, won't auto-update!
Some gems seem to be missing from your vendor/cache directory.
Could not find ansi-1.4.3 in any of the sources
Can't bootstrap, dependencies are outdated.
Import-Module WebAdministration;
$ip = '0.0.0.0'
$port = 443
$sitename = ""
$certificate = ""
if((Test-Path IIS:\SslBindings\$ip!$port) -eq $true) {
$site = Get-Website | Where-Object { $_.Name -eq "$sitename" }
My Repo looks like this
- puppet-modules
- dev-environment
- hiera
etc.
I want to make dev-environment a repository of its own. I don't want to use sub-modules (As they are nasty)
I need the git clone of the puppet-modules repo to bring out the dev-environment repo as well
  • vagrant box add win2012r2x64 locationonfilesystem
  • copy other boxes to ~/.vagrant.d/boxes (on windows that is C:\Users\Name.vagrant.d)

Common issues

  • Invalid package provider chocolatey - check that you have latest - git pull
  • choco list -lo throws invalid something something - type dir c:\chocolatey\lib to verify
  • Folder missing puppet/box_modules - create the folder
  • Unknown configuration section windows something something - vagrant plugin install vagrant-windows
  • box not added errors - check ls ~/.vagrant.d/boxes Check that the naming is exact
This
if ( $LASTEXITCODE ) {
schtasks /create /TN "puppet upgrade task" /TR "C:\Windows\system32\WindowsPowershell\v1.0\powershell.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Bypass -File C:\Windows\Temp\UpgradePuppet.ps1 -version <%= @version %>" /SC Once /ST $startTime /RU SYSTEM
} else {
$today = (Get-Date -f "MM/dd/yyyy")
schtasks /change /TN "puppet upgrade task" /SD $today /ST $startTime /RU SYSTEM
}
Should change to
#!/usr/bin/python
from nagioscheck import NagiosCheck, UsageError
from nagioscheck import PerformanceMetric, Status
import urllib2
import optparse
try:
import json
except ImportError:
import simplejson as json
class powershell::params {
case downcase($::osfamily) {
'windows': {
case $::kernelmajversion {
'6.0': {
case $architecture {
'x64': {
}
'x86': {
https://untappd.com/konabrewing - 101 beers!
https://untappd.com/brewery/11512 - 50 beers!
https://untappd.com/brewery/836 - 176 beers!
https://untappd.com/AlohaBeerCompany - 26 beers!
{:timestamp=>"2014-08-27T22:11:55.574000+0000", :message=>"Failed to flush outgoing items", :outgoing_count=>5000, :exception=>#<RuntimeError: Non-OK response code from Elasticsearch: 504>, :backtrace=>["/opt/logstash/lib/logstash/outputs/elasticsearch/protocol.rb:127:in `bulk_ftw'", "/opt/logstash/lib/logstash/outputs/elasticsearch/protocol.rb:80:in `bulk'", "/opt/logstash/lib/logstash/outputs/elasticsearch.rb:331:in `flush'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:219:in `buffer_flush'", "org/jruby/RubyHash.java:1339:in `each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:216:in `buffer_flush'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:193:in `buffer_flush'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:159:in `buffer_receive'", "/opt/logstash/lib/logstash/outputs/elasticsearch.rb:327:in `receive'", "/opt/logstash/lib/logstash/outputs/base.rb:86:in `handle'", "(eval):23:in `init