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
OctoLab Cookbook: how to use composer.yml and s...
Search
Kamil Samigullin
May 23, 2016
Education
1
58
OctoLab Cookbook: how to use composer.yml and stop creating issues about
Start using all features of YAML with Composer today.
Kamil Samigullin
May 23, 2016
Tweet
Share
More Decks by Kamil Samigullin
See All by Kamil Samigullin
OctoLab Cookbook: Go lang tips and tricks - protection of sensitive config data
kamilsk
1
140
OctoLab Cookbook: how to generate a unique key for a sequence
kamilsk
1
39
Enter Cookbook: refactoring under a microscope
kamilsk
1
55
Other Decks in Education
See All in Education
株式会社アイエスエイ 会社概要
recruit_isa
0
100
データで見る赤ちゃんの成長
syuchimu
0
320
2026 g0v 零時政府年會啟動提案 / g0v Summit 2026 Kickstart
rschiang
0
340
とある長岡高専卒のおっさんがIT企業のマネージャーになるまで / journey-from-nagaoka-kosen-grad-to-it-manager
masaru_b_cl
0
120
日本の情報系社会人院生のリアル -JAIST 修士編-
yurikomium
1
130
小学校女性教員向け プログラミング教育研修プログラム「SteP」の実践と課題
codeforeveryone
0
140
Transición del Management al Neuromanagement
jvpcubias
0
240
Презентация "Знаю Россию"
spilsart
0
260
今の私を形作る4つの要素と偶然の出会い(セレンディピティ)
mamohacy
2
110
~キャラ付け考えていますか?~ AI時代だからこそ技術者に求められるセルフブランディングのすゝめ
masakiokuda
7
500
万博マニアックマップを支えるオープンデータとその裏側
barsaka2
0
890
Réaliser un diagnostic externe
martine
0
150
Featured
See All Featured
Faster Mobile Websites
deanohume
310
31k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
4 Signs Your Business is Dying
shpigford
185
22k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Statistics for Hackers
jakevdp
799
220k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.9k
Music & Morning Musume
bryan
46
6.8k
Building Adaptive Systems
keathley
43
2.8k
It's Worth the Effort
3n
187
28k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Embracing the Ebb and Flow
colly
88
4.8k
Transcript
Episode #1.0.1 (2016-05-25) Level: Beginner OctoLab Cookbook How to use
composer.yml and stop creating issues about
The context
None
The problem
• composer/composer#159 • composer/composer#440 • composer/composer#1778 • composer/composer#1988 • composer/composer#5364
is:issue is:closed yaml
The solution
Installation • https://www.python.org/downloads/ (but most cases it is already exists)
• pip install pyyaml • or apt-get install python-yaml • or yum install python-yaml • etc. Requirements • Python • PyYAML
- first: imports import sys, yaml, json;
- second: suppress traceback sys.tracebacklimit = 0;
- third: print it print(json.dumps(yaml.load(open(sys.argv[1]).read())))
- fourth: integrate all together <command> = python -c \
"import sys, yaml, json; \ sys.tracebacklimit = 0; \ print(json.dumps(yaml.load(open(sys.argv[1]).read()), indent=2))" # ~/.bash_profile alias yaml2json = <command> # use it yaml2json composer.yml > composer.json
The benefits
None
None
None
COMMENTS!!!
None
None
None
Bonus: PhpStorm integration
None
• Convert YAML to JSON Online with related tools on
different languages for console • composer-yaml • Example of usage • package.meta initiative Useful links
Thank you for your attention! Have questions? Kamil Samigullin a
some developer
[email protected]
@ikamilsk github.com/kamilsk linkedin.com/in/kamilsk