Recent releases have been pre-built using cross-compilers and this script and are downloadable below.
If you have found these packages useful, give me a shout out on twitter: @adammw
| function toChineseNumerals(num) { | |
| if (!/^(\d+)(?:\.(\d{1,2}))?$/.test(num)) return ""; | |
| var m = RegExp["$1"], n = RegExp["$2"]; | |
| var a = ["", "萬", "億", "兆", "京", "垓", "秭", "穰", "沟", "涧", "正", "载"]; | |
| var b = ["", "十", "百", "千"]; | |
| var c = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"]; | |
| var d = ["角", "分"]; | |
| return "(大写)" + m.split("").reverse().join("").match(/.{1,4}/g).map(function (item, index, array) { | |
| return b.reduceRight(function (prev, cur, idx, arr) { | |
| return prev += c[item[idx] >>> 0] + cur; |
Recent releases have been pre-built using cross-compilers and this script and are downloadable below.
If you have found these packages useful, give me a shout out on twitter: @adammw
| var el = ( function () { | |
| var doc = document; | |
| var directProperties = { | |
| 'class': 'className', | |
| className: 'className', | |
| defaultValue: 'defaultValue', | |
| 'for': 'htmlFor', | |
| html: 'innerHTML', |
| function get_avatar_from_service(service, userid, size) { | |
| // this return the url that redirects to the according user image/avatar/profile picture | |
| // implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback | |
| // for google use get_avatar_from_service('google', profile-name or user-id , size-in-px ) | |
| // for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word ) | |
| // for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px ) | |
| // for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word ) | |
| // for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px ) | |
| // everything else will go to the fallback | |
| // google and gravatar scale the avatar to any site, others will guided to the next best version |
| #!/bin/sh | |
| # | |
| # redis - this script starts and stops the redis-server daemon | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Redis is a persistent key-value database | |
| # processname: redis-server | |
| # config: /etc/redis/redis.conf | |
| # config: /etc/sysconfig/redis | |
| # pidfile: /var/run/redis.pid |