→ cat nodes-taint.tmpl
{{printf "%-50s %-12s\n" "Node" "Taint"}}
{{- range .items}}
{{- if $taint := (index .spec "taints") }}
{{- .metadata.name }}{{ "\t" }}
{{- range $taint }}
{{- .key }}={{ .value }}:{{ .effect }}{{ "\t" }}
{{- end }}
{{- "\n" }}
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
metav1 = proto.package("k8s.io.apimachinery.pkg.apis.meta.v1") | |
wfv1 = proto.package("github.com.argoproj.argo.pkg.apis.workflow.v1alpha1") | |
def workflow(name = None): | |
""" Common workflow metadata to be used in many workflows """ | |
if not name: | |
name = "workflow" | |
return wfv1.Workflow( | |
metadata = metav1.ObjectMeta( |
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
use_debug true | |
use_bpm 140 | |
use_synth :piano | |
define :song_structure do |i| | |
1.times { i.call } | |
end | |
# Piano Trebel | |
in_thread do |
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
STAMP_DEPS := .deps | |
PHONY: clean run install | |
clean: | |
@rm -rf $(STAMP_DEPS) | |
$(STAMP_DEPS): | |
@pip3 install -r requirements.txt > /dev/null 2>&1 | |
@touch $@ |
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
D ------Exception------- | |
D Class: Kitchen::ActionFailed | |
D Message: Failed to complete #converge action: [bad response #<Faraday::Response:0x007f31560f7df8 @env={:method=>:get, :body=>"503", :url=>#<URI::HTTPS:0x007f3156099050 URL:https://api.berkshelf.com/universe>, :request_headers=>{"User-Agent"=>"Faraday v0.8.8"}, :parallel_manager=>nil, :request=>{:proxy=>nil}, :ssl=>{}, :status=>503, :response_headers=>{"content-type"=>"application/json", "retry-after"=>"600", "content-length"=>"3", "connection"=>"Close"}, :response=>#<Faraday::Response:0x007f31560f7df8 ...>}, @on_complete_callbacks=[]>] | |
D ---Nested Exception--- | |
D Class: RuntimeError | |
D Message: bad response #<Faraday::Response:0x007f31560f7df8 @env={:method=>:get, :body=>"503", :url=>#<URI::HTTPS:0x007f3156099050 URL:https://api.berkshelf.com/universe>, :request_headers=>{"User-Agent"=>"Faraday v0.8.8"}, :parallel_manager=>nil, :request=>{:proxy=>nil}, :ssl=>{}, :status=>503, :response_headers=>{"content-type"=>"application/ |
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
%w{ crazy method names all over the place }.each do |method| | |
class_eval "def #{method}; self[:'#{method}']; end" | |
class_eval "def #{method}=(value); self[:'#{method}'] = value; end" | |
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
@@nagios_service { "check_ssh_${::hostname}": | |
ensure => present, | |
use => 'local-service', | |
check_command => 'check_ssh', | |
service_description => 'SSH', | |
host_name => $::fqdn, | |
notifications_enabled => 1, | |
target => "/etc/nagios/servers/${::fqdn}_host.cfg", | |
} |
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
def new_time(timestamp, options) | |
Time.new( | |
options[:year] || timestamp.year, | |
options[:month] || timestamp.month, | |
options[:day] || timestamp.day, | |
options[:hour] || timestamp.hour, | |
options[:min] || (opt |
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
# Assumes /home/me/myapp is a virtualenv... | |
script "Install Requirements" do | |
interpreter "bash" | |
user "me" | |
group "me" | |
code <<-EOC | |
/home/me/myapp/bin/pip install -r /home/me/myapp/requirements.txt | |
EOC | |
not_if "/home/me/myapp/bin/pip freeze | grep 'an_dependency' > /dev/null" |
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
import sys; open(sys.argv[2], 'w').write(open(sys.argv[1]).read()) |
NewerOlder