Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Burlington Ruby 2015

Burlington Ruby 2015

7fe945668a4fc098e886e20dea71d2ee?s=128

Zachary Scott

August 01, 2015
Tweet

Transcript

  1. @_zzak TBA #btvruby Burlington Ruby Conf

  2. @_zzak TBA #btvruby Hello!!

  3. @_zzak TBA #btvruby 30 minutes is too short

  4. @_zzak TBA #btvruby

  5. @_zzak TBA #btvruby Zachary Scott

  6. @_zzak TBA #btvruby Zachary Scott

  7. @_zzak TBA #btvruby zzak

  8. @_zzak TBA #btvruby zzangief

  9. @_zzak TBA #btvruby Vermont

  10. @_zzak TBA #btvruby My Parents Are Here!!!11!

  11. @_zzak TBA #btvruby My Parents Are Here!!!11!

  12. @_zzak TBA #btvruby My Parents Are Here!!!11!

  13. @_zzak TBA #btvruby My Parents Are Here!!!11!

  14. @_zzak TBA #btvruby San Francisco

  15. @_zzak TBA #btvruby

  16. @_zzak TBA #btvruby

  17. @_zzak TBA #btvruby Substitute Scientist

  18. @_zzak TBA #btvruby LEGACY CODE LEGACY CODE

  19. @_zzak TBA #btvruby Open Source

  20. @_zzak TBA #btvruby Champagne is on me

  21. @_zzak TBA #btvruby Champagne is on me

  22. @_zzak TBA #btvruby

  23. @_zzak TBA #btvruby

  24. @_zzak TBA #btvruby

  25. @_zzak TBA #btvruby

  26. None
  27. @_zzak TBA #btvruby Thank you!!!

  28. @_zzak TBA #btvruby Burlington Ruby Conf

  29. @_zzak TBA #btvruby pass the torch

  30. @_zzak TBA #btvruby

  31. @_zzak TBA #btvruby Terence Lee @hone02

  32. @_zzak TBA #btvruby Melanie @melaniegilman

  33. @_zzak TBA #btvruby Agenda

  34. @_zzak TBA #btvruby

  35. @_zzak TBA #btvruby

  36. @_zzak TBA #btvruby

  37. @_zzak TBA #btvruby

  38. @_zzak TBA #btvruby We're not going to talk about NilClass

  39. @_zzak TBA #btvruby You can though: $~ ri NilClass

  40. @_zzak TBA #btvruby You can though: $~ ri NilClass

  41. @_zzak TBA #btvruby T B A

  42. @_zzak TBA #btvruby To Be Announced

  43. @_zzak TBA #btvruby To Be Announced

  44. @_zzak TBA #btvruby OMG

  45. @_zzak TBA #btvruby Sinatra 2!!!11!

  46. @_zzak TBA #btvruby Sinatra 2!!!11!

  47. @_zzak TBA #btvruby T B A

  48. @_zzak TBA #btvruby To Be Awesome

  49. @_zzak TBA #btvruby 1. Go First

  50. @_zzak TBA #btvruby Single Page Web Apps Work #TeamJavaScript2015

  51. @_zzak TBA #btvruby Single Page Web Apps Work #TeamJavaScript2015

  52. @_zzak TBA #btvruby 1. Go First 2. Learn Japanese

  53. @_zzak TBA #btvruby Ͱ΋ࢲ͸೔ຊޠΛ ڭ͑ํ͕෼͔Βͳ͍

  54. @_zzak TBA #btvruby ࣗ෼Ͱ΍Ζ͏ʂ ͦΕͰ͸

  55. @_zzak TBA #btvruby 1. Go First 2. Learn Japanese

  56. @_zzak TBA #btvruby 1. Go First 2. Learn Japanese 3.

    Build stuff
  57. @_zzak TBA #btvruby Build Stuff

  58. @_zzak TBA #btvruby mruby

  59. @_zzak TBA #btvruby mmmmmruby

  60. @_zzak TBA #btvruby Why mmmmmruby?

  61. @_zzak TBA #btvruby 1. Contributors

  62. @_zzak TBA #btvruby Contributors zzak matz hone matz-r hsbt tshara

    kazuaki ishii
  63. @_zzak TBA #btvruby MINSWAN

  64. @_zzak TBA #btvruby MINSWAN

  65. @_zzak TBA #btvruby MINSWAN

  66. @_zzak TBA #btvruby 1. Contributors 2. Ecosystem

  67. @_zzak TBA #btvruby Ecosystem

  68. @_zzak TBA #btvruby Ecosystem

  69. @_zzak TBA #btvruby Ecosystem

  70. @_zzak TBA #btvruby Renaissance of Ruby

  71. @_zzak TBA #btvruby 1. Contributors 2. Ecosystem 3. Use Case

  72. @_zzak TBA #btvruby Use Case

  73. @_zzak TBA #btvruby Why not CRuby? Use Case

  74. @_zzak TBA #btvruby Designed to be embedded Use Case

  75. @_zzak TBA #btvruby "small"* * TBD Use Case

  76. @_zzak TBA #btvruby Packaging for FREE* * libc as a

    service Use Case
  77. @_zzak TBA #btvruby This Talk. Use Case

  78. @_zzak TBA #btvruby Something I will Use Use Case

  79. @_zzak TBA #btvruby I like learning

  80. @_zzak TBA #btvruby I like learning Japanese

  81. @_zzak TBA #btvruby I want to build a tool to

    help me learn Japanese
  82. @_zzak TBA #btvruby ຖ೔

  83. @_zzak TBA #btvruby ຖ೔ Twitter

  84. @_zzak TBA #btvruby ຖ೔ Podcast

  85. @_zzak TBA #btvruby ຖ೔ Anime

  86. @_zzak TBA #btvruby ຖ೔ News

  87. @_zzak TBA #btvruby

  88. @_zzak TBA #btvruby

  89. @_zzak TBA #btvruby

  90. @_zzak TBA #btvruby

  91. @_zzak TBA #btvruby ৼΓԾ໊ Furigana

  92. @_zzak TBA #btvruby

  93. @_zzak TBA #btvruby

  94. @_zzak TBA #btvruby

  95. @_zzak TBA #btvruby E_TOO_MANY_LINKS

  96. @_zzak TBA #btvruby

  97. @_zzak TBA #btvruby

  98. @_zzak TBA #btvruby

  99. @_zzak TBA #btvruby github.com/nhk-ruby

  100. @_zzak TBA #btvruby Step 1: Get the data

  101. @_zzak TBA #btvruby

  102. @_zzak TBA #btvruby

  103. @_zzak TBA #btvruby

  104. @_zzak TBA #btvruby

  105. @_zzak TBA #btvruby BINGO!!1

  106. @_zzak TBA #btvruby Step 2: Make a gem

  107. @_zzak TBA #btvruby

  108. @_zzak TBA #btvruby

  109. @_zzak TBA #btvruby

  110. @_zzak TBA #btvruby

  111. @_zzak TBA #btvruby

  112. @_zzak TBA #btvruby

  113. @_zzak TBA #btvruby

  114. @_zzak TBA #btvruby

  115. @_zzak TBA #btvruby

  116. @_zzak TBA #btvruby

  117. @_zzak TBA #btvruby It works!!1

  118. @_zzak TBA #btvruby Step 3: Port to mruby

  119. @_zzak TBA #btvruby

  120. @_zzak TBA #btvruby no require

  121. @_zzak TBA #btvruby no require mruby-uri WIP

  122. @_zzak TBA #btvruby

  123. @_zzak TBA #btvruby already utf-8, no encoding support

  124. @_zzak TBA #btvruby Sorry, no kwargs

  125. @_zzak TBA #btvruby There was one problem

  126. @_zzak TBA #btvruby Response Body

  127. @_zzak TBA #btvruby E_TOO_MUCH_HTML

  128. @_zzak TBA #btvruby Enter nhk-ruby-api

  129. @_zzak TBA #btvruby

  130. @_zzak TBA #btvruby Given id respond with text Client#get_text_article

  131. @_zzak TBA #btvruby

  132. @_zzak TBA #btvruby Get HTML

  133. @_zzak TBA #btvruby Convert Furigana HTML to parens

  134. @_zzak TBA #btvruby Keep Furigana HTML

  135. @_zzak TBA #btvruby from mruby

  136. @_zzak TBA #btvruby from mruby

  137. @_zzak TBA #btvruby Deep Breath

  138. @_zzak TBA #btvruby Step 4: Make a cli

  139. @_zzak TBA #btvruby Install: mruby-cli

  140. @_zzak TBA #btvruby Install: mruby-cli

  141. @_zzak TBA #btvruby

  142. @_zzak TBA #btvruby Download binary

  143. @_zzak TBA #btvruby Download binary 64bit OSX

  144. @_zzak TBA #btvruby Download binary LESS THAN 200kb!!1!

  145. @_zzak TBA #btvruby Add to PATH

  146. @_zzak TBA #btvruby

  147. @_zzak TBA #btvruby

  148. @_zzak TBA #btvruby Host

  149. @_zzak TBA #btvruby

  150. @_zzak TBA #btvruby 32-bit CrossBuild

  151. @_zzak TBA #btvruby 64-bit and 32-bit CrossBuild for OSX and

    Windows
  152. @_zzak TBA #btvruby

  153. @_zzak TBA #btvruby

  154. @_zzak TBA #btvruby mrbgem.rake

  155. @_zzak TBA #btvruby Rakefile

  156. @_zzak TBA #btvruby rake :mruby

  157. @_zzak TBA #btvruby rake :compile

  158. @_zzak TBA #btvruby rake :test

  159. @_zzak TBA #btvruby rake test:mtest

  160. @_zzak TBA #btvruby test/test_nhk-easy-cli.rb

  161. @_zzak TBA #btvruby rake test:bintest

  162. @_zzak TBA #btvruby bintest/nhk-easy-cli.rb

  163. @_zzak TBA #btvruby rake clean

  164. @_zzak TBA #btvruby docker-compose.yml

  165. @_zzak TBA #btvruby Dockerfile

  166. @_zzak TBA #btvruby mruby-cli-docker

  167. @_zzak TBA #btvruby mruby-cli-docker

  168. @_zzak TBA #btvruby mruby-cli-docker

  169. @_zzak TBA #btvruby tools/../nhk-easy-cli.c

  170. @_zzak TBA #btvruby tools/../nhk-easy-cli.c

  171. @_zzak TBA #btvruby tools/../nhk-easy-cli.c

  172. @_zzak TBA #btvruby tools/../nhk-easy-cli.c

  173. @_zzak TBA #btvruby mrblib/nhk-easy-cli.rb

  174. @_zzak TBA #btvruby compiling 1. docker-compose build 2. docker-compose run

    compile 3. ??? 4. profit!!!
  175. @_zzak TBA #btvruby docker-compose run test

  176. @_zzak TBA #btvruby docker-compose run test

  177. @_zzak TBA #btvruby docker-compose run test

  178. @_zzak TBA #btvruby Does it run?

  179. @_zzak TBA #btvruby

  180. @_zzak TBA #btvruby

  181. @_zzak TBA #btvruby

  182. @_zzak TBA #btvruby Living the dream

  183. @_zzak TBA #btvruby Now we can just write Ruby

  184. @_zzak TBA #btvruby add dependencies

  185. @_zzak TBA #btvruby interface

  186. @_zzak TBA #btvruby interface

  187. @_zzak TBA #btvruby getopts

  188. @_zzak TBA #btvruby socket woes

  189. @_zzak TBA #btvruby socket woes

  190. @_zzak TBA #btvruby socket woes dreams shattered

  191. @_zzak TBA #btvruby #run

  192. @_zzak TBA #btvruby #report_news

  193. @_zzak TBA #btvruby #report_entry

  194. @_zzak TBA #btvruby ΍ͬͨʂ

  195. @_zzak TBA #btvruby

  196. @_zzak TBA #btvruby

  197. @_zzak TBA #btvruby Step 5: Make a web ui

  198. @_zzak TBA #btvruby Goals Deploy to Heroku Local dev with

    Docker &&
  199. @_zzak TBA #btvruby It starts with a buildpack

  200. @_zzak TBA #btvruby

  201. @_zzak TBA #btvruby heroku buildpacks:set https://github.com/zzak/nginx-mruby-buildpack.git

  202. @_zzak TBA #btvruby web: bin/start-nginx Procfile

  203. @_zzak TBA #btvruby FROM zzak/nginx-mruby-buildpack COPY Procfile /app/Procfile COPY public/*

    /app/public/ COPY *.rb /app/ USER root RUN chown -R app:app /app USER app Dockerfile
  204. @_zzak TBA #btvruby main.rb

  205. @_zzak TBA #btvruby main.rb

  206. @_zzak TBA #btvruby main.rb

  207. @_zzak TBA #btvruby main.rb

  208. @_zzak TBA #btvruby public/style.css

  209. @_zzak TBA #btvruby docker build -t zomg . Build it

  210. @_zzak TBA #btvruby Run it docker run -p 3000:3000 -it

    zomg
  211. @_zzak TBA #btvruby open "http://$(boot2docker ip):3000" See it

  212. @_zzak TBA #btvruby

  213. @_zzak TBA #btvruby On Deploy 1. Copy config/*, bin/* 2.

    Install TerenceRuby 3. Clone ngx_mruby 4. Copy build_config → ngx_mruby 5. Compile ngx_mruby 6. Setup PATHs
  214. @_zzak TBA #btvruby On Startup 1. ERB nginx.conf.erb -> nginx.conf

    2. bin/start-nginx
  215. @_zzak TBA #btvruby Now, fork.

  216. @_zzak TBA #btvruby build_config.rb

  217. @_zzak TBA #btvruby build_config.rb

  218. @_zzak TBA #btvruby 1. git checkout -b forked 2. git

    push origin forked Push forked branch
  219. @_zzak TBA #btvruby heroku buildpacks:set https://github.com/zzak/nginx-mruby-buildpack.git#forked Buildpack URL Protip: Use

    #branch_name for branches in buildpack url
  220. @_zzak TBA #btvruby Dockerfile FROM FROM me/forked-nginx-mruby-buildpack

  221. @_zzak TBA #btvruby Now, Just Write Ruby ...and some JS

  222. @_zzak TBA #btvruby Web#initialize

  223. @_zzak TBA #btvruby Web#initialize How a CVE is made

  224. @_zzak TBA #btvruby Web#body

  225. @_zzak TBA #btvruby Web#body

  226. @_zzak TBA #btvruby Web#body render each entry

  227. @_zzak TBA #btvruby Web#body render pagination

  228. @_zzak TBA #btvruby Web#show_voice

  229. @_zzak TBA #btvruby Web#show_voice LOL vim

  230. @_zzak TBA #btvruby Web#show_movie

  231. @_zzak TBA #btvruby Sprinkle some CSS

  232. @_zzak TBA #btvruby

  233. @_zzak TBA #btvruby ZOMG WE DID IT!!

  234. @_zzak TBA #btvruby Wrap up

  235. @_zzak TBA #btvruby Learning is fun

  236. @_zzak TBA #btvruby Build stuff you can use

  237. @_zzak TBA #btvruby Try mruby-cli

  238. @_zzak TBA #btvruby Try ngx_mruby

  239. @_zzak TBA #btvruby Enjoy the conference

  240. @_zzak TBA #btvruby Thank you!!!!! Burlington Ruby Conf