Thursday, 19 September 2013

How to manage devices in Amazon

http://www.amazon.com/gp/help/customer/display.html/ref=hp_rel_topic?ie=UTF8&nodeId=201252640

Go to Manage Your Kindle to manage your Kindle device or Kindle reading app. The names of your Kindle devices and reading apps appear in a list under Registered Kindles and Kindle Reading Apps.

  1. Visit Manage Your Kindle 
  2. Click Manage Your Devices. 
  3. Click Edit next to the name of the device or application. 
  4. Enter the desired name. 
  5. Click Update.



Wednesday, 18 September 2013

How to repeat an event in Google Calendar

Say if you want to repeat an event every 60 days, what do you do?


There is no option for 60 days!!??

So what's next?

Use Quick Add:
https://support.google.com/calendar/answer/36604?hl=en

Essentially, click here (the triangle next to "Create"):


Enter:
Your event 10pm Oct 14 repeats every 60 days


Viola! You're done =)

Wednesday, 11 September 2013

Images in Responsive Web Development

http://greatfridays.com/blog/images-in-responsive-web-development/

Retina displays:
1. CSS3
2. @font-face icons
3. Pixel density CSS Media Queries
4. SVG images

Image optimizations:
1. Encoding
2. Image compression
3. CSS Sprite sheet

Image replacement:
1. Server side detection frameworks
2. CDN Proxy
3. HTML5 picture element
4. JavaScript detection

Recommendations by Adam Foster


For now, project requirements decide which image replacement technique we use. But regardless of the approach our Engineering team try to adhere to the following, for images in responsive web:
  • Use CSS3 in place of images whenever possible
  • Rasterized background images should be optimized for Retina displays, using a media query or/and @2x images
  • SVG is the prefered format for vector based images
  • Use CSS Sprite sheets to reduce HTTP requests for images
  • Compress images as much as possible while preserving quality. Take time to experiment with compression techniques such as the ‘more detail with less kilobyte’ image compression approach
  • The image replacement approach needs to allow for art direction
  • Images should be optimized for a range of device resolutions
  • Users shouldn’t download multiple versions of the same image

And finally, a few things we are looking forward to making part of our responsive web development workflow in the near future:
  • @font-face custom font for an icon library
  • SVG fragment identifiers
  • The proposed HTML5 picture element


Tuesday, 10 September 2013

You are 31 when you become a billionth-seconds-old

Itchy ass, so I wrote a Python script to verify:

billion = 1000000000
sec_365 = 31536000 # (60 * 60 * 24 *365)
sec_366 = 31622400 # leap years
sec_day = 86400 # 1day = 86400seconds
sec_hour = 3600 # 1hour = 3600seconds
sec_min = 60
years = 0
days = 0
hours = 0
minutes = 0
seconds = 0

def billionConvertToTime(secs):
  global years
  global days
  global hours
  global minutes
  global seconds
  if secs < sec_min:
    seconds = secs
    return years, days, hours, minutes, seconds
  elif secs > sec_365:
    if years % 4 == 0: # leap years
      secs = secs - sec_366
      years += 1
      billionConvertToTime(secs)
    else:
      secs = secs - sec_365
      years += 1
      billionConvertToTime(secs)
  elif secs > sec_day:
    secs = secs - sec_day
    days += 1
    billionConvertToTime(secs)
  elif secs > sec_hour:
    secs = secs - sec_hour
    hours += 1
    billionConvertToTime(secs)
  elif secs > sec_min:
    secs = secs - sec_min
    minutes += 1
    billionConvertToTime(secs)

billionConvertToTime(billion)
print ("One billion seconds equals to %s years, %s days, %s hours, %s minutes and %s seconds" % (years, days, hours, minutes, seconds)) 
Output:
One billion seconds equals to 31 years, 251 days, 1 hours, 46 minutes and 40 seconds

Monday, 9 September 2013

VNC client on 200 lines of JavaScript

How to create a simple VNC client in about 200 lines of JavaScript.
By only using HTML5 and JavaScript (client and server side).
The end result will be something like this:

http://blog.mgechev.com/2013/08/30/vnc-javascript-nodejs/


A Windows 7 environment within Chrome!

Eclipse install software timeout fix

If for any download you get a timeout. Add the following line to the eclipse.ini file (just after the vmargs line):
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=60000


Useful JS libraries

A javascript library for multi-touch gestures.
http://eightmedia.github.io/hammer.js

Simple, lightweight parallax engine that reacts to the orientation of a smart device
http://wagerfield.github.io/parallax/
Github: https://github.com/wagerfield/parallax

write browser JavaScript programs using modules from NPM
http://requirebin.com/
Github: https://github.com/maxogden/requirebin

6 JavaScript Date Libraries for Developers
http://codegeekz.com/6-javascript-date-libraries-for-developers/

Make a use of your favicon with badges, images or videos (animating favicon)
http://lab.ejci.net/favico.js/