给终端文字加点颜色和特效 (来自 http://mozillazg.com/)
文字特效相关的字符格式是:ESC[#;#;....;#m
,其中 # 的取值见下表:
# 的值 | 功能 | python 代码 | 截图 |
---|---|---|---|
00 或 0 | 正常显示 | '\033[00m' + 'hello' + '\033[0;39m' |
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: --> | |
<link rel="apple-touch-icon" href="apple-touch-icon.png"> | |
<!-- For the iPad mini and the first- and second-generation iPad on iOS ≤ 6: --> | |
<link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon-72x72.png"> | |
<!-- For the iPad mini and the first- and second-generation iPad on iOS ≥ 7: --> | |
<link rel="apple-touch-icon" sizes="76x76" href="apple-touch-icon-76x76.png"> | |
<!-- For iPhone with high-resolution Retina display running iOS ≤ 6: --> |
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: --> | |
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png"> | |
<!-- For the iPad mini and the first- and second-generation iPad on iOS ≤ 6: --> | |
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-72x72-precomposed.png"> | |
<!-- For the iPad mini and the first- and second-generation iPad on iOS ≥ 7: --> | |
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="apple-touch-icon-76x76-precomposed.png"> | |
<!-- For iPhone with high-resolution Retina display running iOS ≤ 6: --> |
define( function ( require, exports, module ) { | |
/** | |
* 货币数字格式化 | |
* 将数字整数部分按3位分组加逗号格式化 | |
* | |
* @example | |
* ```javascript | |
* var money = 123456789.1234567; | |
* var moneyFormated = toMoney( money ); |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom \ | |
| while read i; do | |
sudo rm /usr/local/${i} | |
done | |
sudo rm -rf /usr/local/bin/node \ | |
/usr/local/lib/node_modules \ | |
/var/db/receipts/org.nodejs.* |
/** | |
* @file 简易光标定位 | |
* @author zfkun([email protected]) | |
*/ | |
/** | |
* 简易光标定位 | |
* | |
* @param node {(HTMLTextAreaElement | HTMLInputElement)} `TextArea`或`Input`元素 | |
* @param index {number=} 定位位置,不传则定位到末尾 |
给终端文字加点颜色和特效 (来自 http://mozillazg.com/)
文字特效相关的字符格式是:ESC[#;#;....;#m
,其中 # 的取值见下表:
# 的值 | 功能 | python 代码 | 截图 |
---|---|---|---|
00 或 0 | 正常显示 | '\033[00m' + 'hello' + '\033[0;39m' |
#!/bin/bash | |
# | |
# path: .git/hooks/pre-commit | |
echo "\n\x1B[33mCommit checking ...\x1B[0m\n" | |
npm test | |
exitCode=$? | |
if [ $exitCode -ne 0 ] |
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |
define(function() { | |
/** | |
* create a repeat string by a string | |
* | |
* @param {string} str target string | |
* @param {number} count repeat count | |
* @return {string} | |
*/ | |
function repeat( str, count ) { |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>audio test</title> | |
<style> | |
p { font-weight: bold; } | |
span { color: red; } | |
button { width: 100px; height: 30px; } | |
audio { display: block; margin: 5px 0; } |