$ gpg --list-keys
$ gpg --edit-key KEYID
Use the expire command to set a new expire date:
| cd /tmp/kitchen | |
| /opt/chef/embedded/bin/gem install chef-zero | |
| /opt/chef/embedded/bin/chef-zero -d | |
| knife cookbook upload -a -c client.rb | |
| chef-shell -z -c client.rb -o '<YOUR RECIPE>' |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env ruby | |
| # check-smtp | |
| # === | |
| # | |
| # This is a simple SMTP check script for Sensu | |
| # | |
| require 'rubygems' if RUBY_VERSION < '1.9.0' | |
| require 'net/smtp' | |
| require 'sensu-plugin/check/cli' |
| func randomMAC() string { | |
| macBuf := make([]byte, 3) | |
| if _, err := rand.Read(macBuf); err != nil { | |
| panic(err) | |
| } | |
| return fmt.Sprintf("aa:bb:cc:%02x:%02x:%02x", macBuf[0], macBuf[1], macBuf[2]) | |
| } |
| // determines whether a string represents json data | |
| func isJSON(s string) bool { | |
| var js map[string]interface{} | |
| return json.Unmarshal([]byte(s), &js) == nil | |
| } |
| f, err := os.OpenFile("testlogfile", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) | |
| if err != nil { | |
| log.Fatalf("error opening file: %v", err) | |
| } | |
| defer f.Close() | |
| log.SetOutput(f) | |
| log.Println(string(body)) |
| begin | |
| node_storage = data_bag_item('nodes', node.name) | |
| requested_revision = node_storage['deployments'].last['revision'] | |
| rescue Net::HTTPServerException | |
| # data bag item does not exist, create it | |
| new_node = { | |
| 'id' => node.name, | |
| 'deployments' => [{ | |
| 'date' => Time.now, | |
| 'revision' => 'HEAD', |
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) | |
| func main() { | |
| const n = 100 |
| <?php | |
| /* | |
| * $handler = new \Session(); | |
| * session_set_save_handler($handler, true); | |
| * session_start(); | |
| */ | |
| use \SparkLib\Fail; | |
| class Session extends SessionHandler { | |
| public function __construct() { |