Skip to content

Instantly share code, notes, and snippets.


Benjamin W. Smith benjaminws

Block or report user

Report or block benjaminws

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
benjaminws / green_hill_zone.rb
Created Dec 31, 2018
someone discovered sonic-pi
View green_hill_zone.rb
use_debug true
use_bpm 140
use_synth :piano
define :song_structure do |i|
1.times { }
# Piano Trebel
in_thread do
View Makefile
STAMP_DEPS := .deps
PHONY: clean run install
@rm -rf $(STAMP_DEPS)
@pip3 install -r requirements.txt > /dev/null 2>&1
@touch $@
→ cat nodes-taint.tmpl
{{printf "%-50s %-12s\n" "Node" "Taint"}}
{{- range .items}}
    {{- if $taint := (index .spec "taints") }}
        {{- }}{{ "\t" }}
        {{- range $taint }}
            {{- .key }}={{ .value }}:{{ .effect }}{{ "\t" }}
        {{- end }}
        {{- "\n" }}

Keybase proof

I hereby claim:

  • I am benjaminws on github.
  • I am benjaminws ( on keybase.
  • I have a public key whose fingerprint is F5AD 9A35 C7ED DF93 FD1B 1BAB 8EA1 0315 498C 1579

To claim this, I am signing this object:

View welcome.txt
Hopefully you can read this.
View gist:a9adfc5239a7002a0b27
14:30.09 Tue May 27 2014! ~
-> telnet 25
Trying 2001:888:2000:d::a6...
telnet: connect to address 2001:888:2000:d::a6: Connection refused
telnet: connect to address Operation timed out
telnet: Unable to connect to remote host
benjaminws / test-kitchen-berks.log
Created Nov 6, 2013
Every now and I then I see this from Berkshelf. This example was running in a test kitchen.
View test-kitchen-berks.log
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:>, :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:>, :request_headers=>{"User-Agent"=>"Faraday v0.8.8"}, :parallel_manager=>nil, :request=>{:proxy=>nil}, :ssl=>{}, :status=>503, :response_headers=>{"content-type"=>"application/
View what_the_crap.rb
%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"
benjaminws / ssh_service.pp
Created Mar 2, 2013
nagios service example
View ssh_service.pp
@@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",
View new_time.rb
def new_time(timestamp, options)
options[:year] || timestamp.year,
options[:month] || timestamp.month,
options[:day] ||,
options[:hour] || timestamp.hour,
options[:min] || (opt
You can’t perform that action at this time.