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
| import * as d3 from 'd3' | |
| import { navigatorX } from './navigator' | |
| const svg = d3.select('#chart') | |
| .append('svg') | |
| .attr('viewBox', '0 0 800 400') | |
| .style('width', '800px') | |
| const xNavigator = navigatorX().size(800, 54).move(0, 100) |
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
| /** | |
| * Render template string. | |
| * | |
| * @example | |
| * renderTemplate( | |
| * 'Hello {{name}}. The \\{{name}} will be replaced.', | |
| * { name: 'Joe' } | |
| * ) | |
| * // Output: | |
| * // Hello Joe. The {{name}} will be replaced. |
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
| root = true | |
| [*] | |
| charset = utf-8 | |
| end_of_line = lf | |
| indent_size = 2 | |
| indent_style = space | |
| insert_final_newline = true | |
| max_line_length = 0 | |
| trim_trailing_whitespace = true |
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
| package main | |
| import ( | |
| "crypto/hmac" | |
| "crypto/sha256" | |
| "encoding/base64" | |
| "encoding/hex" | |
| "fmt" | |
| ) |
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
| #!/bin/bash | |
| readonly CMD="${@:1}" | |
| if [ "$CMD" == "" ] | |
| then | |
| echo "usage: $0 <command>" | |
| exit 1 | |
| fi |
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
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| "time" | |
| "github.com/golang-jwt/jwt/v5" | |
| ) |
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
| package main | |
| import ( | |
| "bytes" | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "encoding/hex" | |
| "fmt" | |
| "io" |
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
| #!/bin/sh | |
| readonly SERVER_PORT="8388" | |
| readonly SERVER_PASS="your_password" | |
| sudo yum install git | |
| sudo yum install python-setuptools && easy_install pip | |
| sudo pip install git+https://github.com/shadowsocks/shadowsocks.git@master | |
| firewall-cmd --permanent --zone=public --add-port=${SERVER_PORT}/tcp |
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
| /** | |
| * Parse the property path string. | |
| * | |
| * @param {string} path The property path. | |
| * @returns {string[]} Returns the array of path. | |
| */ | |
| function parseObjectPath(path) { | |
| var i = 0; | |
| var l = path.length; | |
| var ch; |
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
| /** | |
| * 格式化价格数字 | |
| * | |
| * @example | |
| * // 123,456.00 | |
| * formatPrice(123456); | |
| * | |
| * @param {number} price 价格数字 | |
| * @param {string} [separator] 可选的分隔符号,默认为英文逗号 `,`。 | |
| * @returns {string} 返回格式化后的价格字符串。 |
NewerOlder