Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

  hetykai

🏠
Working from home
Block or report user

Report or block hetykai

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View setPyMirror.sh
conda config --add channels https://mirrors.cloud.tencent.com/anaconda/cloud/msys2/ && \
conda config --add channels https://mirrors.cloud.tencent.com/anaconda/pkgs/free/ && \
conda config --add channels https://mirrors.cloud.tencent.com/anaconda/cloud/conda-forge/ && \
conda config --add channels https://mirrors.cloud.tencent.com/anaconda/pkgs/main/ && \
conda config --add channels https://mirrors.cloud.tencent.com/anaconda/cloud/bioconda/ && \
conda config --add channels https://mirrors.cloud.tencent.com/anaconda/cloud/menpo/ && \
conda config --add channels https://mirrors.cloud.tencent.com/anaconda/cloud/pytorch/ && \
conda config --set show_channel_urls yes && \
echo -e "[global]\nindex-url = https://mirrors.cloud.tencent.com/pypi/simple" | install -D /dev/stdin ~/.config/pip/pip.conf && \
echo -e "[global]\nindex-url = https://mirrors.cloud.tencent.com/pypi/simple" | install -D /dev/stdin ~/.pip/pip.conf && \
@hetykai
hetykai / setNodeMirror.sh
Last active Aug 15, 2019
修改node npm yarn的镜像源设置,替换为国内的淘宝源
View setNodeMirror.sh
npm set registry https://registry.npm.taobao.org && \
npm set disturl https://npm.taobao.org/dist && \
npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass && \
npm set electron_mirror https://npm.taobao.org/mirrors/electron/ && \
npm set puppeteer_download_host https://storage.googleapis.com.cnpmjs.org && \
npm set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver && \
npm set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver && \
npm set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs && \
npm set selenium_cdnurl https://npm.taobao.org/mirrors/selenium && \
npm set node_inspector_cdnurl https://npm.taobao.org/mirrors/node-inspector && \
View giteaLog20180522
[Macaron] 2018-05-22 11:11:04: Started GET / for 172.17.0.1
2018/05/22 11:11:04 [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `description`, `num_teams`, `num_members`, `diff_view_style` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2018/05/22 11:11:04 [D] Session ID: xxxxxxxxxxxxxxxxxxxxxxxx
2018/05/22 11:11:04 [D] CSRF Token: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
2018/05/22 11:11:04 [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) []interface {}{1, 0x1}
2018/05/22 11:11:04 [I] [SQL] SELECT * FROM `org_user` LEFT J
View S81aria2
#!/bin/sh
#/usr/sbin/service aria2 stop
list=`wget -qO- https://newtrackon.com/api/live|awk NF|sed ":a;N;s/\n/,/g;ta"`
if [ -z "`grep "bt-tracker" /media/AiDisk_a1/aria/config/aria2.conf`" ]; then
sed -i '$a bt-tracker='${list} /media/AiDisk_a1/aria/config/aria2.conf
echo add......
else
sed -i "s@bt-tracker.*@bt-tracker=$list@g" /media/AiDisk_a1/aria/config/aria2.conf
echo update......
@hetykai
hetykai / Arith.java
Created Dec 7, 2015 — forked from binjoo/Arith.java
JAVA:BigDecimal加减乘除运算
View Arith.java
import java.math.BigDecimal;
/**
* 由于Java的简单类型不能够精确的对浮点数进行运算,这个工具类提供精确的浮点数运算,包括加减乘除和四舍五入。
*/
public class Arith { // 默认除法运算精度
private static final int DEF_DIV_SCALE = 10; // 这个类不能实例化
private Arith() {
}
You can’t perform that action at this time.