I hereby claim:
- I am njncalub on github.
- I am njncalub (https://keybase.io/njncalub) on keybase.
- I have a public key ASAaUmWF5h89IR7yI0nzRLe9DPJ91RjEw7wi6jfkFkf5oAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> |
| # file: /etc/nginx/sites-available/example.com | |
| # nginx configuration for example.com | |
| server { | |
| listen 80; | |
| server_name example.com; | |
| access_log /srv/www/example.com/logs/access.log; | |
| error_log /srv/www/example.com/logs/error.log; | |
| # pass root to django |
| npm install -g titanium alloy tishadow | |
| titanium sdk install |
| var win, parentView, imageView; | |
| var initView; | |
| // copy the centerImageView code here | |
| initView = function() { | |
| win = Ti.UI.createWindow({ | |
| backgroundColor: "#cccccc" | |
| }); | |
| parentView = Ti.UI.createView({ |
| /** | |
| * Center a Titanium.UI.ImageView inside a parent Titanium.UI.View | |
| * similar to a `background-size: cover;` in CSS. | |
| * | |
| * Takes 3 parameters: imageRatio, parentView, and imageView | |
| * | |
| * imageRatio: | |
| * an object with the ratio or actual dimension of the image to be placed in the ImageView. | |
| * e.g. {width: 3, height: 2} | |
| * |