Setup Docker on Windows 10

Install Docker on Windows 10 Docker Installer won’t work so I had to download docker-tookbox instead: https://www.docker.com/products/docker-toolbox Boot up VirtualBox boot2docker and run docker -v to make sure everything works One caveat is that docker-compose is pre-installed in boot2docker Setting up and Running PHP project in docker In boot2docker VM, use composer container to pull down app repo into shared folder ie. windows:c\Users\ vs boot2docker/c/Users/ config docker-compose.yml and other app specific config files on host (windows) machine (Make sure boo2docker is open) Open docker command-line (note the docker machine IP address) and run docker-compose up -d under app dir app should be running....

March 20, 2017 · Jason

iPhone cleanup

Took apart my iPhone and cleaned up the dust inside the camera lens. This photo is taken with a more than 10 years Canon camera. Suprisingly not too shabby.

October 7, 2016 · Jason

Yii 2.0 Authorization: RBAC

To setup Role Based Access Control in Yii 2.0, there are three steps: Step 1: Defining Roles and Permissions (What are the roles: permissions vs. roles) Role and permission should be defined in common/rbac/items.php. The file can be either generated by yii rbac/initcommand or hand wirtten. To generate items.php file, write the definitions in console/controllers/RbacController.php Refer to http://www.yiiframework.com/doc-2.0/guide-security-authorization.html#generating-rbac-data Step 2: Defining Rules (Who has what role: roles vs. users) Rules are to control who can do that....

September 23, 2016 · Jason

Notes on Yii 2.0 Asset Publishing

Some notes on asset publishing One huge benefit of using asset publishing is it allows easy asset management when the folder structure in local dev environment is different from production. For example, on local environment the css files could be located at /yii/assets/css . This folder is also web accesssible. On production this might be different. /yii/assets/css is not web accessible and /yii/public_html/css is. /yii/public_html/css might not be under source controll tools....

August 13, 2016 · Jason

最近做的几件事

最近在看什么:周星驰的《喜剧之王》,Pixar的《Inside Out》,Adam的《Pixels》,同事推荐的《Gattaca》,时间穿越的《Project Almanac》,重新拾起的《Walking Dead》,魔术师的《Penn & Teller Fool Us》 最近在听什么:《IT公论》,莫文蔚的《Candy Kisses》 最近在研究什么:ThinkPHP,Drupal 7 最近在用什么(App):Podcasts,点点Goal,Pocket,Wunderlist,Evernote 最近在玩什么(App):Shooty Skies, Dash Quest, Soda Dungeon 最近想什么:出去疯

October 18, 2015 · Jason

Floating 2 of hearts

December 14, 2014 · Jason

Macbook Pro

September 12, 2014 · Jason

Bottle cap

August 7, 2014 · Jason

Mayday

March 30, 2014 · Jason

Findmyhome123 (Winter 2013)

A screenshot of my recent website project.

February 19, 2014 · Jason