Skip to content

Instantly share code, notes, and snippets.

View luckymike's full-sized avatar

Michael F. Weinberg luckymike

View GitHub Profile
#!/usr/bin/env ruby
#^syntax detection
site 'http://community.opscode.com/api/v1'
cookbooks = Dir.glob(File.join('site-cookbooks/*/metadata.*')).map{ |file| File.dirname(file) }
cookbooks.each do |cb|
cookbook File.basename(cb), :path => cb
end
@luckymike
luckymike / BART_Weekday_Ridership_January_2015.csv
Created March 21, 2015 19:24
BART Weekday Ridership Averages January 2015
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 46 columns, instead of 31. in line 6.
Exit stations,RM,EN,EP,NB,BK,AS,MA,19,12,LM,FV,CL,SL,BF,HY,SH,UC,FM,CN,PH,WC,LF,OR,RR,OW,EM,MT,PL,CC,16,24,GP,BP,DC,CM,CV,ED,NC,WP,SS,SB,SO,MB,WD,OA
RM,14,133,107,129,459,117,164,165,211,52,99,76,50,38,45,22,26,39,30,13,20,10,9,20,25,310,374,474,351,186,187,38,72,62,18,8,14,8,44,12,33,42,29,8,7
EN,149,20,119,138,966,164,294,499,634,123,148,147,69,57,91,37,44,84,39,22,50,14,14,41,45,891,"1,059","1,002",773,240,195,78,115,103,38,11,38,9,48,30,53,89,63,17,28
EP,115,104,16,72,715,94,141,299,322,77,60,53,31,19,29,10,12,51,19,18,24,13,13,38,19,539,670,427,410,110,58,34,36,43,6,8,25,5,16,9,15,57,29,11,20
NB,127,123,81,21,193,84,104,249,265,76,75,66,35,24,32,12,23,37,21,19,31,13,10,24,20,699,824,459,518,165,101,44,42,33,9,9,17,9,20,7,18,89,39,9,31
BK,500,972,743,216,36,410,471,561,557,266,327,206,173,139,158,84,131,267,145,152,152,89,58,58,108,942,974,855,780,355,287,142,102,115,36,52,109,49,116,31,40,232,150,60,105
AS,113,140,86,86,361,24,105,264,286,81,129,88,47,38,52,26,40,69,25,22,24,10,6,16,33,712,814,514,568,27
@luckymike
luckymike / gist:5d26c0f49bf278bb3ddd
Last active August 29, 2015 14:17
Who, What, Where, Why, When, How of Continuous Provisioning

Continuous Provisioning results in infrastructures that change over time in response to engineering actions. Infrastructure can be represented as a story that develops over time.

Journalism teaches "Who, What, Where, Why, When, How" as the 5 questions to answer in telling a story. We can ask the same questions of our continuously provisioned systems:

  • Who: The engineer whose change(s) triggered the provisioning event.
  • What: The codebase that changed (e.g. git repo), which corresponds to specific provisioned systems.
  • Where: The destination of the provisioned systems. This might be the account/region/provider into which the provisioning occurred, as well as the operating environment (e.g. production, staging) of the provisioned system.
  • Why: The change(s) that trigged the provisioning event.
  • When: A timestamp when the provisioning event occurred.
  • How: The method by which the system(s) were provisioned (e.g. CI system, CLI tooling, web-console).
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 46 columns, instead of 31. in line 6.
Exit stations,RM,EN,EP,NB,BK,AS,MA,19,12,LM,FV,CL,SL,BF,HY,SH,UC,FM,CN,PH,WC,LF,OR,RR,OW,EM,MT,PL,CC,16,24,GP,BP,DC,CM,CV,ED,NC,WP,SS,SB,SO,MB,WD,OA
RM,14,133,107,129,459,117,164,165,211,52,99,76,50,38,45,22,26,39,30,13,20,10,9,20,25,310,374,474,351,186,187,38,72,62,18,8,14,8,44,12,33,42,29,8,7
EN,149,20,119,138,966,164,294,499,634,123,148,147,69,57,91,37,44,84,39,22,50,14,14,41,45,891,"1,059","1,002",773,240,195,78,115,103,38,11,38,9,48,30,53,89,63,17,28
EP,115,104,16,72,715,94,141,299,322,77,60,53,31,19,29,10,12,51,19,18,24,13,13,38,19,539,670,427,410,110,58,34,36,43,6,8,25,5,16,9,15,57,29,11,20
NB,127,123,81,21,193,84,104,249,265,76,75,66,35,24,32,12,23,37,21,19,31,13,10,24,20,699,824,459,518,165,101,44,42,33,9,9,17,9,20,7,18,89,39,9,31
BK,500,972,743,216,36,410,471,561,557,266,327,206,173,139,158,84,131,267,145,152,152,89,58,58,108,942,974,855,780,355,287,142,102,115,36,52,109,49,116,31,40,232,150,60,105
AS,113,140,86,86,361,24,105,264,286,81,129,88,47,38,52,26,40,69,25,22,24,10,6,16,33,712,814,514,568,27
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 46 columns, instead of 31. in line 6.
Exitstations,RM,EN,EP,NB,BK,AS,MA,19,12,LM,FV,CL,SL,BF,HY,SH,UC,FM,CN,PH,WC,LF,OR,RR,OW,EM,MT,PL,CC,16,24,GP,BP,DC,CM,CV,ED,NC,WP,SS,SB,SO,MB,WD,OA
RM,14,133,107,129,459,117,164,165,211,52,99,76,50,38,45,22,26,39,30,13,20,10,9,20,25,310,374,474,351,186,187,38,72,62,18,8,14,8,44,12,33,42,29,8,7
EN,149,20,119,138,966,164,294,499,634,123,148,147,69,57,91,37,44,84,39,22,50,14,14,41,45,891,"1,059","1,002",773,240,195,78,115,103,38,11,38,9,48,30,53,89,63,17,28
EP,115,104,16,72,715,94,141,299,322,77,60,53,31,19,29,10,12,51,19,18,24,13,13,38,19,539,670,427,410,110,58,34,36,43,6,8,25,5,16,9,15,57,29,11,20
NB,127,123,81,21,193,84,104,249,265,76,75,66,35,24,32,12,23,37,21,19,31,13,10,24,20,699,824,459,518,165,101,44,42,33,9,9,17,9,20,7,18,89,39,9,31
BK,500,972,743,216,36,410,471,561,557,266,327,206,173,139,158,84,131,267,145,152,152,89,58,58,108,942,974,855,780,355,287,142,102,115,36,52,109,49,116,31,40,232,150,60,105
AS,113,140,86,86,361,24,105,264,286,81,129,88,47,38,52,26,40,69,25,22,24,10,6,16,33,712,814,514,568,272
@luckymike
luckymike / BART_Weekday_Ridership_January_2015.csv
Created April 13, 2015 00:29
BART Weekday Ridership January 2015
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 46 columns, instead of 33. in line 6.
Exitstations,RM,EN,EP,NB,BK,AS,MA,19,12,LM,FV,CL,SL,BF,HY,SH,UC,FM,CN,PH,WC,LF,OR,RR,OW,EM,MT,PL,CC,16,24,GP,BP,DC,CM,CV,ED,NC,WP,SS,SB,SO,MB,WD,OA
RM,14,133,107,129,459,117,164,165,211,52,99,76,50,38,45,22,26,39,30,13,20,10,9,20,25,310,374,474,351,186,187,38,72,62,18,8,14,8,44,12,33,42,29,8,7
EN,149,20,119,138,966,164,294,499,634,123,148,147,69,57,91,37,44,84,39,22,50,14,14,41,45,891,1059,1002,773,240,195,78,115,103,38,11,38,9,48,30,53,89,63,17,28
EP,115,104,16,72,715,94,141,299,322,77,60,53,31,19,29,10,12,51,19,18,24,13,13,38,19,539,670,427,410,110,58,34,36,43,6,8,25,5,16,9,15,57,29,11,20
NB,127,123,81,21,193,84,104,249,265,76,75,66,35,24,32,12,23,37,21,19,31,13,10,24,20,699,824,459,518,165,101,44,42,33,9,9,17,9,20,7,18,89,39,9,31
BK,500,972,743,216,36,410,471,561,557,266,327,206,173,139,158,84,131,267,145,152,152,89,58,58,108,942,974,855,780,355,287,142,102,115,36,52,109,49,116,31,40,232,150,60,105
AS,113,140,86,86,361,24,105,264,286,81,129,88,47,38,52,26,40,69,25,22,24,10,6,16,33,712,814,514,568,272,144,4
@luckymike
luckymike / BART_Weekday_Ridership_January_2015.csv
Created April 24, 2015 19:38
BART Ridership from SFO and OAK
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 46 columns, instead of 33. in line 6.
Exitstations,RM,EN,EP,NB,BK,AS,MA,19,12,LM,FV,CL,SL,BF,HY,SH,UC,FM,CN,PH,WC,LF,OR,RR,OW,EM,MT,PL,CC,16,24,GP,BP,DC,CM,CV,ED,NC,WP,SS,SB,SO,MB,WD,OA
RM,14,133,107,129,459,117,164,165,211,52,99,76,50,38,45,22,26,39,30,13,20,10,9,20,25,310,374,474,351,186,187,38,72,62,18,8,14,8,44,12,33,42,29,8,7
EN,149,20,119,138,966,164,294,499,634,123,148,147,69,57,91,37,44,84,39,22,50,14,14,41,45,891,1059,1002,773,240,195,78,115,103,38,11,38,9,48,30,53,89,63,17,28
EP,115,104,16,72,715,94,141,299,322,77,60,53,31,19,29,10,12,51,19,18,24,13,13,38,19,539,670,427,410,110,58,34,36,43,6,8,25,5,16,9,15,57,29,11,20
NB,127,123,81,21,193,84,104,249,265,76,75,66,35,24,32,12,23,37,21,19,31,13,10,24,20,699,824,459,518,165,101,44,42,33,9,9,17,9,20,7,18,89,39,9,31
BK,500,972,743,216,36,410,471,561,557,266,327,206,173,139,158,84,131,267,145,152,152,89,58,58,108,942,974,855,780,355,287,142,102,115,36,52,109,49,116,31,40,232,150,60,105
AS,113,140,86,86,361,24,105,264,286,81,129,88,47,38,52,26,40,69,25,22,24,10,6,16,33,712,814,514,568,272,144,4
@luckymike
luckymike / BART_Ridership_FY73_FY14.csv
Created April 24, 2015 23:04
Historic BART Ridership Averages
Year Weekday Saturday Sunday
1973 32000
1974 57400
1975 118003
1976 131000
1977 133453
1978 146780
1979 151712
1980 148682
1981 161965
@luckymike
luckymike / gist:5fb38a012f5997a12670
Created April 29, 2015 22:05
Packagecloud GPG Error
STDOUT:
STDERR: Importing GPG key 0xD59097AB:
Userid: "packagecloud ops (production key) <ops@packagecloud.io>"
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-packagecloud_io
https://packagecloud.io/chef/stable/el/6/x86_64/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
https://packagecloud.io/chef/stable/el/6/x86_64/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
Error: failure: repodata/primary.xml.gz from chef_stable_: [Errno 256] No more mirrors to try.
---- End output of yum -q makecache -y --disablerepo=* --enablerepo=chef_stable_ ----
@luckymike
luckymike / .kitchen.yml
Created April 30, 2015 16:16
Specifying a Version for Centos fails
suites:
- name: default
run_list:
- recipe[test]
- recipe[chef-server]
- recipe[test::post-install]
attributes:
chef-server:
api_fqdn: 'chef-server-tk.example.com'
version: 12.0.7-1