Creating an API documentation in Swagger using YAML

UPD: I wrote this for swagger v1.2. Stuff changed since then. Now swagger allows you using yaml and it wants just one file so making specs is easier now. What a time to be alive!

Few days ago was the first time I created a REST API documentation. This is the report how I did it.

Read full post »

Published at 2014-06-02

Tags: rest, api, yii, php, documentation, swagger, yaml, json


Mysql formats for some data types

Proper mysql column types for things like emails, coorditates, password hashes and stuff like that.

Read full post »

Published at 2014-05-23

Tags: mysql


Free bootstrap admin themes

You don't really care how admin panel looks like, yeah?

Bootstrap allows you to create not-so-ugly UI elements but you still have to assemble them into templates.

But there's some free admin themes for bootstrap that are already designed.

Read full post »

Published at 2014-05-22

Tags: links, bootstrap, ui


Inline PDF in html page

A piece of php code for inserting pdf files into html pages.

Read full post »

Published at 2014-05-21

Tags: html, pdf, php


Cartograpther - a PHP component to generate sitemaps

Some info about a good tool for creating sitemap.xml files and some tips about how to use it.

Read full post »

Published at 2014-05-15

Tags: seo, php


Disabling autocomplete

Browsers are so smart they are trying to fill forms for you. And sometimes this is bad.

Html5 provides an attribute autocomplete="on|off" to prefent browsers filling fields for you. And you should add autocomplete="off" to inputs in cases like these:

  • "Set password", "Change password" and "Retype password" fields.
  • Captcha field.
  • Credit card number.

Sometimes you need to do it for security reasons. Sometimes it just makes your forms more comfortable.

Published at 2014-05-13

Tags: html5, security, usability, ui