This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HealthCron < BaseCron | |
def _run | |
@backend.publisher.hgetall @backend.class::GilmourHealthKey do |r| | |
known_hosts = Hash.new(0) | |
r.each_slice(2) do pslice| | |
host = slice[0] | |
known_hosts[host] = "gilmour.health.#{host}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error: | |
Checking presence of file (checksum: <<"62420201a93adbd0f124bcdc77213941">>) for org <<"4cdd131099cc3ecdad7ed6a1c6509c95">> from bucket "bucket-name-cookbooks" (key: "organization-4cdd131099cc3ecdad7ed6a1c6509c95/checksum-62420201a93adbd0f124bcdc77213941") raised exception error:{aws_error,{http_error,301,{[{"x-amz-request-id","AD07CF7712CEC563"},{"x-amz-id-2","MHXAjJx+aJ8WlGBOp1ivpQPbPSG6hxv3c+Ls8IcqwozDWg8A3SPMd5kSVCHOqtx7"},{"content-type","application/xml"},{"date","Wed, 28 Oct 2015 09:33:02 GMT"},{"server","AmazonS3"},{"connection","close"}],[]}}} | |
Config: | |
S3_URL = "s3.amazonaws.com" | |
#S3 Settings | |
bookshelf['enable'] = false | |
bookshelf['external_url'] = "https://#{S3_URL}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==> default: ================================================================================ | |
==> default: Error executing action `create` on resource 'template[managed_hosts_file]' | |
==> default: ================================================================================ | |
==> default: | |
==> default: | |
==> default: RuntimeError | |
==> default: ------------ | |
==> default: File templates/default/hosts.erb does not exist for cookbook hosts_file | |
==> default: | |
==> default: Resource Declaration: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type BaseApp interface { | |
Name() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'logger' | |
# require 'stringio' | |
# StringIO also do as IO, but IO#reopen fails. | |
# The problem is that a StringIO cannot exist in the O/S's file descriptor | |
# table. STDERR.reopen(...) at the low level does a dup() or dup2() to | |
# copy one file descriptor to another. | |
# | |
# I have two options: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'logger' | |
require 'stringio' | |
def capture_output | |
old_stderr, $stderr = $stderr, StringIO.new | |
old_stdout, $stdout = $stdout, StringIO.new | |
yield | |
[$stderr.string, $stdout.string] | |
ensure | |
$stderr = old_stderr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
f() | |
fmt.Println("Returned normally from f.") | |
} | |
func f() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"time" | |
) | |
type Inner struct { | |
Count int | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"os" | |
"sync" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "log" | |
type EventLogger interface { | |
Log() int | |
} | |
type EventA struct { | |
Id int |