Monday, May 8, 2017

Send Email Directly to a Folder (Label) in Gmail

Here are the steps to set this up:
1. Log in to your gMail account

2. Create a new label. Call it whatever you like. Note: use an underscore instead of a space when naming your labels. This label will be listed on the left-hand side of your window.
3. Now Create a filter by clicking on Settings, then on Filters
4. Place your cursor in the input box labeled To: and type in where gmail_username is your GMail username. For instance Then click next.
5. Now check Apply the label and choose Neat_Stuff or whatever you named your label.
6. Check Skip the inbox to automatically send the message to that label instead of your main inbox.
7. Finally Click Create filter and you’re ready to go!

Optional Step:
8. I found that by adding the email address to my personal contact on my phone has made this even easier. Go to your specific contact in the contacts on your phone and add an additional email address to that contact that looks like this:
changing the default to whatever your username and label are. That way when you find something you want to forward to your email, you can start typing your email address in the To: field and the tweaked email address will show up as an option.

Monday, March 27, 2017


The first thing you probably want to do is make sure Ionic-CLI and Cordova are up to date:
npm install -g cordova ionic@beta
This line will also install both frameworks from scratch if you don’t have previous installations.
For the next step, you need to be inside a project folder.


Warning: Backup your project before you do this next step.
I bet a lot of you have a previous experience with Ionic v1. Back then, Ionic v1 was updated using this line:
ionic lib update
This solution no longer works. Ionic v1 used bower under the hood; Ionic v2 is moving away from this approach.
New solution requires us to know current Ionic v2 version. To find this information, open an official Ionic Framework npm page, look at the right side, you’ll find it there:
Ionic 2 npm page
This value should be a current Ionic 2 Framework version.
Let’s get back to our local project. Find a local version of package.json, search for a dependencies section, and update ionic-framework parameter value.
If Ionic 2 is still in alpha status, prior to doing next step, you may want to remove the ionic-framework folder from node_modules folder.
Update your project using this line:
npm install
While manually updating Ionic 2 settings, you can’t know if a newly updated version also requires additional/new dependencies. If any dependency changed since the last installation, you’d receive an error looking like this:
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.2.3
npm ERR! npm  v2.14.7
npm ERR! peerinvalid The package angular2@2.0.0-alpha.52 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer ionic-framework@2.0.0-alpha.49 wants angular2@2.0.0-beta.0
npm ERR! Please include the following file with any support request:
npm ERR!     E:\Programiranje\Ionic2\Ionic2FirstApp\npm-debug.log
As you can see, my current Ionic 2 version requires newer Angular2 version; update package.json accordingly.
Do this step over and over until you find a stable combination.
Finally, let’s check if everything is working as it should:
ionic serve

Tuesday, February 7, 2017

iPhone Screen Size and Web Design Tips

Apple updated its iPhone a bit ago making the form factor much bigger. The iPhone 6 screen size is both wider and taller and the iPhone 6 Plus also has a higher pixel density. This is an update to my previous post about designing websites for the iPhone 5. It’ll cover these new screen sizes and try to clarify how this all works.
Update: Apple has released the iPhone 6s and iPhone 6s Plus. The iPhone 6s screen size is identical to the previous iPhone 6 versions, so feel free to follow the existing sizes below.
Update 2: Apple just announced the iPhone 7 & 7 Plus. These iPhone 7 models follow the same screen sizes as the 6s & 6s Plus, you can use the sizes listed below.

iPhone Screen Measurements

There are a few different values to consider when looking at the iPhone screen sizes. I’m going to get these values defined here so the chart below makes more sense:
iPhone Display Size (inches) – This is diagonal measure of the screen, from corner to corner, just like you’d measure a TV.
iPhone Screen Size (points) – These points are the size that the device is using for coordinates. If you’re designing for the web (using CSS or JavaScript) these values will be helpful. iPhones use Retina screens which have a higher pixel density. This means they take the larger iPhone resolution (mentioned above) and compress those pixels into a smaller space to make the image look sharper.
iPhone Rendered Pixels – This is the full number of pixels that are being rendered. This is the value you get when you apply the multiplier (1x, 2x, 3x) the device uses to the screen size in points. If you’re creating an image and want it at the max resolution, this is the size you’d use. 
iPhone Physical Pixels – This is the actual screen’s pixel resolution. The iPhone 6 Plus is using a a larger image resolution on a screen with a smaller number of physical pixels, so it needs to be downsampled to this size. This value is really only important in a specifications perspective, but shouldn’t really affect your designs.
iphone 6 plus screen

iPhone Screen Size Comparison

This image shows the browser screen size of the iPhones for use when writing CSS. See the table below for all the measurements of each phone. If you’re using iOS 8 the Safari menu height is consistent across all the iPhones.
iphone 6 screen size
iPhone 4iPhone 5iPhone 6/7iPhone 6/7 Plus
Display Size3.5 in4 in4.7 in5.5 in
Screen Size320 x 480 points320 x 568 points375 x 667 points414 x 736 points
Rendered Pixels640 x 960 (@2x)640 x 1136 (@2x)750 x 1334 (@2x)1242 x 2208 (@3x)
Physical Pixels640 x 960640 x 1136750 x 13341080 x 1920
Pixels Per Inch (PPI)326326326401
Browser Size Portrait320 x 372 px
(320 x 440* / 320 x 460**)
320 x 460 px
(320 x 528* / 320 x 548**)
375 x 559 px
(375 x 627* / 375 x 647**)
414 x 628 px
(414 x 696* / 414 x 716**)
Browser Size Landscape480 x 212 px
(480 x 280* / 480 x 300**)
568 x 212 px
(568 x 280* / 568 x 300**)
667 x 267 px
(667 x 335* / 667 x 355**)
736 x 306 px
(736 x 374* / 736 x 394**)
* – measurements with the small browser navigation bar
** – measurements without any browser chrome for a web app
Note that the iPhone 6 Plus is a 3x screen. For the previous iPhones you can double the screen size values to figure out the max size of your retina image, but on the iPhone 6 Plus you’ll want to triple that value (i.e. a full screen graphic would be 1242 x 2208).

Using the iPhone 6 Screen Size for Web Design

If you’re coding your site using Responsive design in order to fit the iPhone well, you may have some sizing issues if you don’t tell the device not to zoom in. You can do this by adding this viewport metatag into the head of your site:
<meta name="viewport" content="initial-scale=1.0">

iPhone 6 Startup Screen

If you’re going to be setting up your website so users can save it and run it as a web app you can add a startup image to display when the page is loading.
First add the web app meta tag (also make sure you’re not using a width in your viewport meta tag as this can cause issues):
<meta name="apple-mobile-web-app-capable" content="yes" />
Then create startup images at these sizes for compatibility with each phone:
iPhone 1 – 3gs:320 x 460 px
iPhone 4 – 4s:640 x 920 px
iPhone 5:640 x 1096 px
iPhone 6:750 x 1294 px
iPhone 6 Plus:1242 x 2148 px
Then add the code in your page’s header to link to them:
<link rel="apple-touch-startup-image" href="images/ios_startup.png"> 
<link rel="apple-touch-startup-image" href="images/ios_startup@2x.png" sizes="640x920">
<link rel="apple-touch-startup-image" href="images/ios_startup-large@2x.png" sizes="640x1096">
<link rel="apple-touch-startup-image" href="images/ios_startup-6@2x.png" sizes="750x1294">
<link rel="apple-touch-startup-image" href="images/ios_startup-6-plus@3x.png" sizes="1242x2148">

iPhone 6 Icons

When designing iPhone 6 icons you’ll notice there is a new size for the higher pixel density iPhone 6 plus. If you’d like to add an icon to your site that people will see when they save it to their homescreen, take a look at my article on creating an iPhone icon, which includes the sizes you’ll need.