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

技育祭2022春 1時間に詰め込む「はてなインターン」

Hatena
March 22, 2022

技育祭2022春 1時間に詰め込む「はてなインターン」

2022/03/19 https://talent.supporterz.jp/geeksai/2022spring/
はてなリモートインターンシップ2022 の開催告知はこちら! https://developer.hatenastaff.com/entry/intern-2022-preentry

Hatena

March 22, 2022
Tweet

More Decks by Hatena

Other Decks in Programming

Transcript

  1. Πϯλʔϯߨٛύʔτ w ΢ΣϒαʔϏεͷ։ൃʹؔ͢Δߨٛͱ՝୊ w ۙ೥ͷ༷ࢠ w  w 4DBMBPS1FSMͰϒϩάαʔϏε w

      w (Pͱ3FBDUΛ༻͍ͨϒϩάαʔϏε w   w ,VCFSOFUFT H31$ͷϚΠΫϩαʔϏεʹΑΔϒϩάγεςϜ
  2. ΠϯλʔϯͷߨٛΧϦΩϡϥϜ w 8FC"1* w 8FCαʔϏεΠϯϑϥೖ໳ w ίϯςφٕज़ͱ%PDLFS w ,VCFSOFUFTͷ࢓૊Έͱ 


    ϋϯζΦϯ w ϚΠΫϩαʔϏε w ݱ୅తͳϑϩϯτΤϯυ։ൃ w 3%#.4 w 1FSM࠶ೖ໳ w 8FCΤϯδχΞͷͨΊͷ 
 σβΠϯೖ໳ w 8FCαʔϏεͷاը w "84ߨٛ
  3. ΠϯλʔϯͷߨٛΧϦΩϡϥϜ w 8FC"1* w 8FCαʔϏεΠϯϑϥೖ໳ w ίϯςφٕज़ͱ%PDLFS w ,VCFSOFUFTͷ࢓૊Έͱ 


    ϋϯζΦϯ w ϚΠΫϩαʔϏε w ݱ୅తͳϑϩϯτΤϯυ։ൃ w 3%#.4 w 1FSM࠶ೖ໳ w 8FCΤϯδχΞͷͨΊͷ 
 σβΠϯೖ໳ w 8FCαʔϏεͷاը w "84ߨٛ
  4. ΠϯλʔϯͷߨٛΧϦΩϡϥϜ w 8FC"1* w 8FCαʔϏεΠϯϑϥೖ໳ w ίϯςφٕज़ͱ%PDLFS w ,VCFSOFUFTͷ࢓૊Έͱ 


    ϋϯζΦϯ w ϚΠΫϩαʔϏε w ݱ୅తͳϑϩϯτΤϯυ։ൃ w 3%#.4 w 1FSM࠶ೖ໳ w 8FCΤϯδχΞͷͨΊͷ 
 σβΠϯೖ໳ w 8FCαʔϏεͷاը w "84ߨٛ ࠶ܝ
  5. ΠϯλʔϯͷߨٛΧϦΩϡϥϜ w 8FC"1* w 8FCαʔϏεΠϯϑϥೖ໳ w ίϯςφٕज़ͱ%PDLFS w ,VCFSOFUFTͷ࢓૊Έͱ 


    ϋϯζΦϯ w ϚΠΫϩαʔϏε w ݱ୅తͳϑϩϯτΤϯυ։ൃ w 3%#.4 w 1FSM࠶ೖ໳ w 8FCΤϯδχΞͷͨΊͷ 
 σβΠϯೖ໳ w 8FCαʔϏεͷاը w "84ߨٛ
  6. "1* "QQMJDBUJPO1SPHSBNNJOH*OUFSGBDF w HMJCD • window.alert() • https://api.github.com/repos/mackerelio/mkr $ curl

    https://api.github.com/repos/mackerelio/mkr { "id": 25763415, "node_id": "MDEwOlJlcG9zaXRvcnkyNTc2MzQxNQ==", "name": "mkr", "full_name": "mackerelio/mkr", "private": false,
  7. )551ͷྺ࢙ w )551 w )5514 w )551 w )551 w

    (PPHMF͕41%:Λൃද w (PPHMF͕26*$Λൃද w 41%:Λݩʹ)551 ඪ४Խ w )551PWFS26*$Λ )551ʹվ໊ w 26*$ඪ४Խ w 9)551ඪ४Խʁ
  8. )551 • RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1 •

    RFC 2616 Hypertext Transfer Protocol -- HTTP/1.1 • RFC 7230 Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing • RFC 7231 Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content • RFC 7232 Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests • RFC 7233 Hypertext Transfer Protocol (HTTP/1.1): Range Requests • RFC 7234 Hypertext Transfer Protocol (HTTP/1.1): Caching • RFC 7235 Hypertext Transfer Protocol (HTTP/1.1): Authentication
  9. )551ϦΫΤετͱϨεϙϯε $MJFOU 4FSWFS GET / HTTP/1.1 Host: www.hatena.ne.jp User-Agent: curl/7.79.1

    Accept: */* HTTP/1.1 200 OK Date: Wed, 16 Mar 2022 19:13:41 GMT Content-Type: text/html; charset=utf-8 Content-Length: 320777 Connection: keep-alive Server: nginx <!DOCTYPE html><html lang="ja"><head><script> ...
  10. )551ͷηϚϯςΟΫε w ϦΫΤετߦ w ϝιου w (&51045165)&"%%&-&5&015*0/453"$&$0//&$51"5$) w λʔήοτ w

    ઈରύεͱΫΤϦ FHTFBSDI RUFYU  w όʔδϣϯ )551 GET / HTTP/1.1 Host: www.hatena.ne.jp User-Agent: curl/7.79.1 Accept: */*
  11. )551ͷηϚϯςΟΫε w εςʔλεߦ w όʔδϣϯ )551  w TUBUVTDPEF w

    1xx*OGPSNBUJPOBM w 2xx4VDDFTTGVM w 3xx3FEJSFDUJPO w 4xx$MJFOU&SSPS w 5xx4FSWFS&SSPS w SFBTPO HTTP/1.1 200 OK Date: Wed, 16 Mar 2022 19:13:41 GMT Content-Type: text/html; charset=utf-8 Content-Length: 320777 Connection: keep-alive Server: nginx <!DOCTYPE html><html lang="ja"><head><script> ...
  12. )551ͷηϚϯςΟΫε w ϔομ w ϦΫΤετʹ΋Ϩεϙϯεʹ΋͋Δ w ඪ४ϔομɺඇඪ४ϔομ GET / HTTP/1.1

    Host: www.hatena.ne.jp User-Agent: curl/7.79.1 Accept: */* HTTP/1.1 200 OK Date: Wed, 16 Mar 2022 19:13:41 GMT Content-Type: text/html; charset=utf-8 Content-Length: 320777 Connection: keep-alive Server: nginx <!DOCTYPE html><html lang="ja"><head><script> ...
  13. )551ͷηϚϯςΟΫε w ϘσΟ w ϦΫΤετʹ΋Ϩεϙϯεʹ΋ؚΊΒΕΔ w ϔομ͔ΒߦۭߦΛڬΉ w σʔλͷछྨ͸$POUFOU5ZQFϔομͰ w

    ѹॖ͢Δ͜ͱ΋Ͱ͖·͢ POST /upload HTTP/1.1 Content-Type: application/x-www-form-urlencoded key=value&another_key=another_value HTTP/1.1 200 OK Date: Wed, 16 Mar 2022 19:13:41 GMT Content-Type: text/html; charset=utf-8 Content-Length: 320777 Connection: keep-alive Server: nginx <!DOCTYPE html><html lang="ja"><head><script> ...
  14. )551ϑϨʔϜ +-----------------------------------------------+ | Length (24) | +---------------+---------------+---------------+ | Type (8)

    | Flags (8) | +-+-------------+---------------+-------------------------------+ |R| Stream Identifier (31) | +=+=============================================================+ | Frame Payload (0...) ... +---------------------------------------------------------------+ +---------------+ |Pad Length? (8)| +---------------+-----------------------------------------------+ | Data (*) ... +---------------------------------------------------------------+ | Padding (*) ... +---------------------------------------------------------------+ +---------------+ |Pad Length? (8)| +-+-------------+-----------------------------------------------+ |E| Stream Dependency? (31) | +-+-------------+-----------------------------------------------+ | Weight? (8) | +-+-------------+-----------------------------------------------+ | Header Block Fragment (*) ... +---------------------------------------------------------------+ | Padding (*) ... +---------------------------------------------------------------+ %"5" )&"%&34
  15. 8FC"1* w ඪ४Խ͞Εͨఆٛ͸ͳ͍ w αʔόʔαΠυ8FC"1*ʢతͳ෺ʣࠓ೔͸͜Ε w )551ܦ༝Ͱ৘ใΛऔಘͨ͠Γॻ͖׵͑ͨΓ͢Δ w ਓؒʹݟͤΔͨΊͰ͸ͳͯ͘ػցతʹૢ࡞͢ΔͨΊ w

    +40/ͱ͔9.-Λ࢖͏͜ͱ͕ଟ͍ w ΫϥΠΞϯταΠυ8FC"1*ʢతͳ෺ʣ w 8FCϑϩϯτΤϯυ͔Βݺͼग़ͤΔϒϥ΢βͷ"1*ͱ͔
  16. Ϧιʔεࢦ޲ w Ϧιʔεͷ৔ॴΛࢦࣔ͢͠63- ૢ࡞ͷछผΛද͢)551ϝιου w ྫ͑͹(JU)VCͷΠγϡʔίϝϯτͷૢ࡞ • GET /repos/:owner/:repo/issues/comments/:comment_id •

    POST /repos/:owner/:repo/issues/:issue_number/comments • PATCH /repos/:owner/:repo/issues/comments/:comment_id • DELETE /repos/:owner/:repo/issues/comments/:comment_id w Ϧιʔεࢦ޲Ͱ͸ͳ͍"1*63-ͷྫ • GET /api/graphql
  17. interface Actor { login: String! } type Issue { author:

    Actor body: String! title: String! } type Repository { issue(number: Int!): Issue } type Query { repository(name: String!, owner: String!): Repository }
  18. 1SPUPDPM#VGGFST syntax = "proto3"; package account; service Account { rpc

    Signup(SignupRequest) returns (SignupReply); } message SignupRequest { string name = 1; string password = 2; } message SignupReply { string token = 1; }