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/python | |
| """ | |
| Usage: | |
| python swagger-yaml-to-html.py < /path/to/api.yaml > doc.html | |
| """ | |
| import yaml, json, sys | |
| TEMPLATE = """ |
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
| <?php | |
| use Symfony\Component\PropertyAccess\PropertyAccess; | |
| use Symfony\Component\Validator\Constraints\All; | |
| use Symfony\Component\Validator\Constraints\Choice; | |
| use Symfony\Component\Validator\Constraints\Collection; | |
| use Symfony\Component\Validator\Constraints\Length; | |
| use Symfony\Component\Validator\Constraints\NotBlank; | |
| use Symfony\Component\Validator\Constraints\Optional; | |
| use Symfony\Component\Validator\Constraints\Required; |
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
| @startuml | |
| ' uncomment the line below if you're using computer with a retina display | |
| ' skinparam dpi 300 | |
| !define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> | |
| ' we use bold for primary key | |
| ' green color for unique | |
| ' and underscore for not_null | |
| !define primary_key(x) <b>x</b> | |
| !define unique(x) <color:green>x</color> | |
| !define not_null(x) <u>x</u> |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <ruleset name="Custom"> | |
| <description>Project Coding Standard</description> | |
| <rule ref="PSR2" /> | |
| <rule ref="~/.composer/vendor/object-calisthenics/phpcs-calisthenics-rules/ObjectCalisthenics/ruleset.xml"/> | |
| </ruleset> |
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
| { | |
| "require": { | |
| "laravel/lumen-installer": "~1.0", | |
| "phpunit/phpunit": "^4.6", | |
| "phpmetrics/phpmetrics": "*", | |
| "hirak/prestissimo": "*", | |
| "sebastian/phpcpd": "*", | |
| "sebastian/phpdcd": "*", | |
| "phpmd/phpmd": "*", | |
| "squizlabs/php_codesniffer": "*", |
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
| { | |
| "bitwise" : true, | |
| "camelcase" : true, | |
| "curly" : true, | |
| "eqeqeq" : true, | |
| "forin" : true, | |
| "immed" : true, | |
| "indent" : 4, | |
| "latedef" : true, | |
| "newcap" : true, |
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
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#begin() | |
| " let vundle manage vundle | |
| Plugin 'gmarik/vundle' | |
| " Bundle 'Shougo/vimproc' | |
| " Bundle 'Shougo/unite.vim' | |
| " Bundle 'm2mdas/phpcomplete-extended' | |
| " list all plugins that you'd like to install here | |
| Plugin 'kien/ctrlp.vim' " fuzzy find files |
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
| # If you come from bash you might have to change your $PATH. | |
| # export PATH=$HOME/bin:/usr/local/bin:$PATH | |
| # Path to your oh-my-zsh installation. | |
| export ZSH=/home/lgrusev/.oh-my-zsh | |
| # Set name of the theme to load. Optionally, if you set this to "random" | |
| # it'll load a random theme each time that oh-my-zsh is loaded. | |
| # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
| ZSH_THEME="robbyrussell" |
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
| # use UTF8 | |
| set -g utf8 | |
| set-window-option -g utf8 on | |
| set -g prefix C-a | |
| unbind C-b | |
| bind C-a send-prefix | |
| # 0 is too far from ` ;) | |
| set -g base-index 1 |
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
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
NewerOlder