To make design to be more
- Understandable
- Easy to extend
- Easy to Maintain, Refactor
| #!/bin/sh | |
| # echo -e command takes color code | |
| # \e[32m -- Green | |
| # \e[31m -- Red | |
| # \e[0m -- Reset/Normal Color | |
| GREEN="\e[32m" | |
| RED="\e[31m" | |
| ENDCOLOR="\e[0m" |
| /** | |
| * version1: convert online image | |
| * @param {String} url | |
| * @param {Function} callback | |
| * @param {String} [outputFormat='image/png'] | |
| * @author HaNdTriX | |
| * @example | |
| convertImgToBase64('http://goo.gl/AOxHAL', function(base64Img){ | |
| console.log('IMAGE:',base64Img); | |
| }) |
| <!-- | |
| How to use Google JS Visualization Api offline, step by step | |
| this approach might work with other libraries loaded with google.load, after all it's still JavaScript!!! | |
| --> | |
| <!DOCTYPE html> | |
| <html> |