Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
入力した CIDR のネットワーク・アドレスを表示する Alfred ワークフローを作った
Search
lorentzca
November 12, 2017
Programming
0
1.4k
入力した CIDR のネットワーク・アドレスを表示する Alfred ワークフローを作った
FFLT の資料です。
lorentzca
November 12, 2017
Tweet
Share
More Decks by lorentzca
See All by lorentzca
Continuous Vulnerability scanning on CircleCI
lorentzca
1
3.1k
Other Decks in Programming
See All in Programming
CSC509 Lecture 04
javiergs
PRO
0
290
プログラミングどうやる? ~テスト駆動開発から学ぶ達人の型~
a_okui
0
190
Playwrightはどのようにクロスブラウザをサポートしているのか
yotahada3
7
2.3k
Local Peer-to-Peer APIはどのように使われていくのか?
hal_spidernight
2
450
明日から始めるリファクタリング
ryounasso
0
110
LLMとPlaywright/reg-suitを活用した jQueryリファクタリングの実際
kinocoboy2
4
670
ネイティブ製ガントチャートUIを作って学ぶUICollectionViewLayoutの威力
jrsaruo
0
130
Web技術を最大限活用してRAW画像を現像する / Developing RAW Images on the Web
ssssota
2
1.2k
アメ車でサンノゼを走ってきたよ!
s_shimotori
0
140
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
590
CSC509 Lecture 01
javiergs
PRO
1
430
CI_CD「健康診断」のススメ。現場でのボトルネック特定から、健康診断を通じた組織的な改善手法
teamlab
PRO
0
180
Featured
See All Featured
Navigating Team Friction
lara
189
15k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
A Tale of Four Properties
chriscoyier
160
23k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
114
20k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
We Have a Design System, Now What?
morganepeng
53
7.8k
Faster Mobile Websites
deanohume
310
31k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Transcript
ೖྗͨ͠ CIDR ͷωοτϫʔΫɾΞ υϨεΛදࣔ͢Δ Alfred ϫʔΫϑ ϩʔΛ࡞ͬͨ @lorentzca
࡞ͬͨత • Alfred ͷϫʔΫϑϩʔΛͳΜ͔͠Β࡞Γ͍ͨ • Go ͰͳΜ͔͠Β࡞Γ͍ͨ • ঁͷࢠ͔Β CIDR
ͷωοτϫʔΫɾΞυϨεΛฉ͔Εͨࡍʹଈ ࠲ʹ͍͑ͨ(Πέϝϯ)
Alfred ͷϫʔΫϑϩʔͷ͘͠Έ Ϣʔβ͕ͳΜ͔ೖྗ͢Δ → ͳΜ͔ͷॲཧΛ͢Δ → Ξτϓοτ ͢Δ
Ϣʔβ͕ͳΜ͔ೖྗ͢Δ
Ϣʔβ͕ͳΜ͔ೖྗ͢Δ Alfred Ͱ {query} ͱͯ͠ࢀরͰ͖Δɻ
ͳΜ͔ͷॲཧΛ͢Δ Alfred ͷ Script Filter Λ͏ͱҙͷίʔυΛͬͯ݁ՌΛ Alfred ʹ͢͜ͱ͕ग़དྷΔ • ࠓճͷ߹Ϣʔβʔ͕ೖྗͨ͠
CIDR ΛҾͱͯ͠ Go Ͱ࡞ ͬͨπʔϧʹ͠ɺ • ωοτϫʔΫɾΞυϨεΛ json Ͱฦ͢ ॲཧΛߦ͏ ※ Go ͷ net ύοέʔδΛ༻ͯ͠ CIDR ͷॲཧΛ͍ͯ͠Δɻ
ͳΜ͔ͷॲཧΛ͢Δ Script FilterͰ࡞ͨ͠σʔλΛ Alfred ͢ࡍͷϑΥʔϚοτ json ͔ xml ΛબΔɻjson
Alfred 3 ͔ΒରԠͨ͠ɻ ! json ܗࣜͷϑΥʔϚοτͷྫҎԼ(࠷ݶඞཁͳͷ {"items": [{"title": "hoge"}]} )ɻ {"items": [ { "title": "hoge", "arg": "hoge" } ]} ※ arg ͕ॏཁɻ
Ξτϓοτ͢Δ arg Φϓγϣϯ͕͋ΔͱɺͦͷσʔλΛ࣍ͷϑϩʔʹΈࠐΊ Δɻ • ΫϦοϓϘʔυʹίϐʔ • ௨ηϯλʔʹ௨ • etc...
Alfred ͰΈΔͱ͜Μͳײ͡
σϞ
·ͱΊ • Alfred ॊೈʹ৭ʑग़དྷΔ ! • ͖ͳεΫϦϓτΛͬͯͳΜ͔͢Δࡍʹɺ Script Filter Λ
͏͜ͱͱ json ϑΥʔϚοτ Λ͏͜ͱɺ arg Φϓγϣϯ Λ ͏͜ͱ͕ॏཁ • ωοτϫʔΫɾΞυϨεҎ֎දࣔͰ͖ΔΑ͏ʹ͍ͨ͠
Ռ GitHub - lorentzca/alfred-ipv4-network-workflow: Get ipv4 netowrk.
ࢀߟϦϯΫ Go • net - The Go Programming Language •
json - The Go Programming Language Alfred • Features Overview - Alfred Help and Support • Script Filter - Workflow Input Objects - Alfred Help and Support • Script Filter JSON Format - Workflow Input Objects - Alfred