Skip to content

Instantly share code, notes, and snippets.

View Jiezhi's full-sized avatar
:shipit:
Working hard

Jiezhi.G Jiezhi

:shipit:
Working hard
View GitHub Profile
@Jiezhi
Jiezhi / surge.tasks.sgmodule
Last active September 9, 2023 07:56
surge.tasks.sgmodule
#!name=iOS Tasks Module
#!desc=iOS Tasks 模块配置
#!system=ios
[Script]
# Tasks: 去哪儿 = type=cron,cronexp=4 0 * * *,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/qunar/qunar.js
#Tasks: 网易新闻 = type=cron,cronexp=4 0 * * *,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/neteasenews/neteasenews.js
# Tasks: 腾讯视频 = type=cron,cronexp=3 0 * * *,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/videoqq/videoqq.js
# Tasks: 10010 = type=cron,cronexp=0 9 * * *,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/10010/10010.js,wake-system=true
# Tasks: AcFun = type=cron,cronexp=3 0 * * *,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/acfun/acfun.js,wake-system=true
@Jiezhi
Jiezhi / surge.cookies.sgmodule
Last active December 14, 2021 03:05
surge.cookies.sgmodule
#!name=iOS Cookies Module
#!desc=iOS Cookies 模块配置, Upon https://raw.githubusercontent.com/chavyleung/scripts/master/surge.cookies.sgmodule
#!system=ios
[Script]
Rewrite: 10010 = type=http-request,pattern=^https:\/\/act.10010.com\/SigninApp(.*?)\/signin\/daySign,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/10010/10010.cookie.js
Rewrite: 10010 = type=http-request,pattern=^https:\/\/act.10010.com\/SigninApp\/signin\/querySigninActivity.htm,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/10010/10010.cookie.js
Rewrite: 10010 = type=http-request,pattern=^https:\/\/m.client.10010.com\/dailylottery\/static\/(textdl\/userLogin|active\/findActivityInfo),script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/10010/10010.cookie.js
Rewrite: 10086 = type=http-request,pattern=^http:\/\/wx.10086.cn\/website\/taskCenter\/index\?,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/10086/10086.cookie.js
Rewrite: 10086 = type=http-request,pa
@Jiezhi
Jiezhi / query_columns_in_reversed_name.sql
Last active April 16, 2020 08:41
检索字段名为保留关键字的表
SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA NOT IN ('information_schema', 'performance_schema', 'mysql') AND TABLE_NAME NOT LIKE '%.bak' AND
COLUMN_NAME IN
('ADD', 'ALL', 'ALTER', 'ANALYZE', 'AND', 'AS', 'ASC', 'AUTO_INCREMENT', 'BDB', 'BERKELEYDB', 'BETWEEN',
'BIGINT',
'BINARY', 'BLOB', 'BOTH', 'BTREE', 'BY', 'CASCADE', 'CASE', 'CHANGE', 'CHAR', 'CHARACTER', 'CHECK', 'COLLATE',
'COLUMN', 'COLUMNS', 'CONSTRAINT', 'CREATE', 'CROSS', 'CURRENT_DATE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP',
'DATABASE', 'DATABASES', 'DAY_HOUR', 'DAY_MINUTE', 'DAY_SECOND', 'DEC', 'DECIMAL', 'DEFAULT', 'DELAYED',
'DELETE', 'DESC', 'DESCRIBE', 'DISTINCT', 'DISTINCTROW', 'DIV', 'DOUBLE', 'DROP', 'ELSE', 'ENCLOSED', 'ERRORS',
@Jiezhi
Jiezhi / create_date_dim.hql
Last active November 25, 2019 06:49
[Hive]Create Date Dim
CREATE DATABASE IF NOT EXISTS common_ods;
CREATE TABLE IF NOT EXISTS common_ods.dim_date AS WITH dates AS
(SELECT date_add("${start_day}", a.pos) AS d
FROM
(SELECT posexplode(split(repeat("o", datediff("${end_day}", "${start_day}")), "o"))) a)
SELECT row_number() OVER (
ORDER BY d) date_sk,
d AS d,
year(d) AS YEAR,
month(d) AS MONTH,
@Jiezhi
Jiezhi / js.json
Created November 13, 2018 06:30
js.json
{
"bbIndex": {
"h": 238,
"idx": {
"i": "0:rua,rud-ruh,s1g-s1r,s8m-s8z,sfr-sg5,smw-sna,snd,su0,su4-suj,t19-t1m,t8e-t8r,tfj-tfw,tmo-tn1,ttu-tu6,u0z-u1b,u84-u8h,uf9-ufm,ume-umr,uth-utw,v0m-v11,v7s-v86,vew-vfd,vm1-vmn,vt5-vtt,w06-w0s,w79-w7v,wee-wez,wlj-wm4,wsn-wt9,wzr-x0h,x6t-x7n,xdy-xer,xl3-xlw,xs8-xt2,xzd-y07,y6i-y7a,ydm-yee,ykr-ylj,yrw-ysr,yz3-yzw,z6a-z71,zdf-ze3,zkm-zl5,zrr-zsa,zyv-zzf,1060-106l,10d7-10dp,10kc-10kd,10kh-10ku,10kx-10l0,10ro-10s5,10yu-10zb,115z-116h,11d2-11d4,11d8-11do,11k6-11k9,11kd-11kt,11ri-11ry,11yq-11z4,125v-126a,12d1-12de,12k6-12kj,12rb-12rn,12yg-12ys,135l-135x,13cq-13d0,13jv-13k5,13qz-13ra,13y4-13yf,1459-145l,14ce-14cq,14ji-14jv,14qm-14r1,14xn-14y7,154s-155b,15bx-15cf,15j3-15jj,15q9-15qn,15xe-15xg,15xl-15xn,15xp-15xr|1:yg3,ymt-ymv,yn0,yn6-yn8,ytz-yud,z14-z1i,z89-z8q,zfd-zfg,zfl-zfw,zmi-zmj,zmq-zn2,ztv-zu8,1010-101e,1085-108j,10fb-10fq,10mg-10mv,10tj-10u0,110o-1115,117t-118a,11ey-11ff,11m2-11mj,11t7-11tp,120b-120v,127f-127y,12e0,12ej-12f3,12l5,12lo-12m8,12
@Jiezhi
Jiezhi / iterm2-solarized.md
Created November 6, 2018 02:51 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@Jiezhi
Jiezhi / Markdown-JavaScript.markdown.js
Created July 28, 2018 07:12 — forked from jimschubert/Markdown-JavaScript.markdown.js
DataGrip (IntelliJ) output SQL results to Markdown
if (!String.prototype.repeat) {
// polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat
String.prototype.repeat = function(count) {
'use strict';
if (this == null) {
throw new TypeError('can\'t convert ' + this + ' to object');
}
var str = '' + this;
count = +count;
if (count != count) {
Process: QQ [419]
Path: /Applications/QQ.app/Contents/MacOS/QQ
Identifier: com.tencent.qq
Version: 6.3.0 (32337)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: QQ [419]
User ID: 502
Date/Time: 2018-07-06 00:07:10.170 +0800
import pandas as pd
# Calculate information value
def calc_iv(df, feature, target, pr=0):
lst = []
for i in range(df[feature].nunique()):
val = list(df[feature].unique())[i]
lst.append([feature, val, df[df[feature] == val].count()[feature], df[(df[feature] == val) & (df[target] == 1)].count()[feature]])
@Jiezhi
Jiezhi / centos_init.sh
Last active April 19, 2020 06:12
my centos init script
yum update -y
yum upgrade -y
yum groupinstall 'Development Tools' -y
yum install wget vim zsh git tmux htop lsof nload zlib-devel openssl-dev -y
# install htop
wget dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
rpm -ihv epel-release-7-11.noarch.rpm
yum install htop -y
# install sdkman