- Visual Studio Codeを起動する
- サイドバーから
Extensions
を開く - 検索窓に
@category:"language packs"
を入力 Japanese Language Pack for VS Code
を見つけてInstall
をクリック- VSCodeを再起動
This file contains hidden or 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
curl "https://www.dl.ndl.go.jp/api/iiif/1184132/manifest.json" | jq .sequences[].canvases[].images[].resource.'"@id"' > output.list |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'open-uri' | |
require 'json' | |
query_table = [ | |
["api_key", ""], # https://www.flickr.com/services/appsでアプリを作成しapiキーを入手してください | |
["method", "flickr.photos.search"], | |
["tags", "soviet,russia"], # タグをコンマ区切りで指定します | |
["tag_mode", "all"], # anyを指定すると「または」、allを指定すると「かつ」 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
010 札幌 sapporo | |
011 函館 hakodate | |
012 旭川 asahikawa | |
013 帯広 obihiro | |
014 釧路 kushiro | |
015 北見 kitami | |
016 室蘭 muroran | |
020 青森 aomori | |
030 盛岡 morioka | |
040 仙台 sendai |
-
api-portal.nhk.or.jpにアクセス api-portal.nhk.or.jpにアクセスし、アカウントを作成。「ユーザ登録がお済みでない方はこちら」をクリックしアカウントを作成する。
-
アプリを作成 ログイン後、マイページを開きアプリを作成する。「アプリのURL」は任意のため、「アプリ名」を入力するだけでOK。アプリが作成できたら「登録済みアプリ」ページからそのアプリのページを開くと、APIにアクセスするのに必要なAPIキーを確認することができる。コピー&ペーストしてファイルに保存しておく。
-
使用できるAPIは4種類
This file contains hidden or 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
# .develoer_idにはデベロッパIDを.access_tokenにはアクセストークンをそれぞれ改行なしで入れるものとする | |
curl -H "X-IIJmio-Developer:$(cat .developer_id)" -H "X-IIJmio-Authorization:$(cat .access_token)" https://api.iijmio.jp/mobile/d/v2/coupon/ > test |
This file contains hidden or 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
#!/usr/bin/ruby | |
# 15で割った余りに注目してFizzBuzz | |
class Integer | |
def fizzbuzz | |
case self % 15 | |
when 0 then "FizzBuzz" | |
when 5,10 then "Buzz" | |
when 3,6,9,12 then "Fizz" | |
else self |