Skip to content

Instantly share code, notes, and snippets.

@nstielau
nstielau / config.json
Last active December 17, 2015 08:08
Check syntax for triggering remediation (publish:false) actions. If occurrences is 1 or 2, and the severity is 1 (warning), the light_remediation will be triggered. If occurrences is 3 through 10, and the severity is 1 (warning), the medium_remediation will be triggered. If occurrences is above 2, and the severity is 2 (critical), the heavy_reme…
{
"handlers": {
"remediator": {
"type": "pipe",
"command": "/etc/sensu/handlers/remediator.rb"
},
},
"checks": {
"fail_with_remediation": {
"command": "/bin/false",
@agoddard
agoddard / dump_tabs.applescript
Created March 8, 2013 03:31
Save URLs of all open safari tabs to TextEdit
tell application "Safari"
--Variables
set windowCount to number of windows
set docText to ""
--Repeat for Every Window
repeat with x from 1 to windowCount
set tabcount to number of tabs in window x
--Repeat for Every Tab in Current Window
repeat with y from 1 to tabcount
--Get Tab Name & URL
vagrant@vagrant:~$ sudo chef-solo -c /tmp/vagrant-chef-2/solo.rb -j /tmp/vagrant-chef-2/dna.json
[Thu, 28 Jul 2011 00:49:38 +0000] INFO: *** Chef 0.10.2 ***
[Thu, 28 Jul 2011 00:49:38 +0000] INFO: Setting the run_list to ["recipe[minitest]", "recipe[minitest::examples]"] from JSON
[Thu, 28 Jul 2011 00:49:38 +0000] INFO: Run List is [recipe[minitest], recipe[minitest::examples]]
[Thu, 28 Jul 2011 00:49:38 +0000] INFO: Run List expands to [minitest, minitest::examples]
[Thu, 28 Jul 2011 00:49:38 +0000] INFO: Starting Chef Run for vagrant.monkeybrains.net
[Thu, 28 Jul 2011 00:49:38 +0000] INFO: Processing gem_package[minitest] action install (minitest::default line 19)
[Thu, 28 Jul 2011 00:49:42 +0000] INFO: gem_package[minitest] installed version ~> 2.3.1
[Thu, 28 Jul 2011 00:49:42 +0000] INFO: Processing gem_package[net-tftp] action install (minitest::default line 24)
[Thu, 28 Jul 2011 00:49:42 +0000] INFO: Chef Handlers will be at: /tmp/handlers