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
55
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
130
OctoLab Cookbook: how to generate a unique key for a sequence
kamilsk
1
33
Enter Cookbook: refactoring under a microscope
kamilsk
1
54
Other Decks in Education
See All in Education
HCL Notes/Domino 14.5 EAP Drop1
harunakano
1
140
Medicare 101 for 2025
robinlee
PRO
0
440
Nodiレクチャー 「CGと数学」講義資料 2024/11/19
masatatsu
1
290
BEM FASILKOM UNEJ Navaratna
bemilkomunej24
0
130
Образцы вооружения и техники ВС РФ
obzr
0
130
自己紹介 / who-am-i
yasulab
PRO
2
4.5k
1127
cbtlibrary
0
180
Sähköiset kyselyt, kokeet ja arviointi
matleenalaakso
1
18k
TP5_-_UV.pdf
bernhardsvt
0
130
Evaluation Methods - Lecture 6 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
800
1216
cbtlibrary
0
270
ワクワク発見資料
akenohoshi
0
170
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1367
200k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
39
1.9k
Scaling GitHub
holman
459
140k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
No one is an island. Learnings from fostering a developers community.
thoeni
20
3.1k
Fireside Chat
paigeccino
34
3.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.6k
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