This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript | |
function numberWithCommas(x) { | |
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
} | |
// or use Nuber.prototype.toLocaleString() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<style> | |
body, html{ | |
width: 100%; | |
height: 100%; | |
margin: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Create the Root Key ..." | |
openssl genrsa -out rootCA.key 2048 | |
echo "self-sign this certificate ..." | |
SUBJECT="/C=CN/ST=BeiJing/L=HaiDian/O=hiipack/OU=DEV/CN=hiipack/[email protected]" | |
openssl req -x509 -new -subj $SUBJECT -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.pem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
read -p "Enter your domain [www.example.com]: " DOMAIN | |
echo "Create A Certificate ..." | |
openssl genrsa -out $DOMAIN.key 2048 | |
echo "generate the certificate signing request ..." | |
#SUBJECT="/C=CN/ST=BeiJing/L=/O=hiipack/OU=DEV/CN=hiipack/[email protected]" | |
openssl req -new -key $DOMAIN.key -out $DOMAIN.csr | |
echo "sign the CSR, which requires the CA root key ..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void | |
function() { | |
'use strict'; | |
var http = require('http'), | |
url = require('url'), | |
net = require('net'); | |
function printError(err, msg, url) { | |
console.log('%s %s: %s', new Date().toLocaleTimeString(), msg, url, err); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Bezier Curve Edit</title> | |
<script type="text/javascript"> | |
"use strict"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Canvas Bezier Curve</title> | |
</head> | |
<body> | |
<p>双击:添加新的点</p> | |
<img id="cursor" style="display:none" src="data:image/x-icon;base64,AAACAAEAICAAAAAAAACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAEAAAABwAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAHAAAABQAAAAIAAAAAAAAAAAAAAAEAAAAEAAAABwAAAAgAAAAHAAAABQAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAABIAAAAeAAAAIgAAACIAAAAiAAAAIgAAACIAAAAiAAAAIgAAACIAAAAiAAAAIgAAACAAAAAYAAAACQAAAAEAAAAAAAAABgAAABIAAAAeAAAAIgAAACAAAAAYAAAACQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAALGZmZo1mZmaUZmZmlGZmZpRmZmaUZmZmlGZmZpRmZmaUZmZmlGZmZpRmZmaUZmZmk2ZmZokAAAAa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void | |
function() { | |
'use strict'; | |
var http = require('http'), | |
url = require('url'), | |
net = require('net'); | |
function printError(err, msg, url) { | |
console.log('%s %s: %s', new Date().toLocaleTimeString(), msg, url, err); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file 控制台文本颜色 | |
* @author zdying | |
*/ | |
'use strict'; | |
(function(){ | |
var colorDisabled = process.argv.indexOf('--no-color') !== -1; |