Skip to content

Instantly share code, notes, and snippets.

😀
😃
😄
😁
😆
😅
😂
🤣
🥲
☺️
@cshijiel
cshijiel / rm.js
Created November 18, 2019 01:13
雪球 批量取关
// https://xueqiu.com/center/#/friends
const rm = function () {
try {
$('.followed')[0].click();
} catch (e) {
let $timelineTabTags = $('.timeline__tab__tags a');
$timelineTabTags[4].click();
$timelineTabTags[5].click();
}
public <T> void retryAction(Supplier<T> task, Predicate<T> predicate, Consumer<T> after, int retryTimes) {
for (int i = 0; i < retryTimes; i++) {
T res = task.get();
log.info("retry result {}", res);
if (predicate.test(res)) {
after.accept(res);
break;
}
}
}
@cshijiel
cshijiel / Investors-said.json
Last active March 30, 2021 07:58
投资者说
{
"2016-01-18": [
{
"all_title": "[交易时间]投资者说 但斌:股灾只因估值高 一些人亿万资产剩零头",
"channel": "CCTV-2财经频道",
"durations": 509,
"id": 12879092,
"imglink": "https://p5.img.cctvpic.com/fmspic/2016/01/18/1ce132eced1142cca6b82027d0a73d50-240.jpg",
"playtime": 1453096800000,
"tV": "其他",
@cshijiel
cshijiel / 隐藏知乎收费回答.js
Created July 2, 2019 12:55
隐藏知乎收费回答 油猴脚本
// ==UserScript==
// @name 隐藏知乎收费回答
// @namespace https://www.zhihu.com/
// @version 0.1
// @description 隐藏知乎收费回答
// @author You
// @match https://www.zhihu.com/*
// @grant none
// ==/UserScript==
@cshijiel
cshijiel / ansible.sh
Created November 20, 2018 11:40
Ansible命令
ansible --private-key ~/.ssh/moviebar-backend-online -i /etc/ansible/hosts cloud -m shell -a "grep 'merchant ' /data/logs/moviebar-cloud/moviebar_cloud.log|tail -n 2"
@cshijiel
cshijiel / InternetMap.java
Created August 20, 2018 05:44
北京互联网地图
package com.roc.test;
import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Builder;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
private static class ClearParameterNameProvider implements ParameterNameProvider {
private static ParameterNameDiscoverer discoverer = new LocalVariableTableParameterNameDiscoverer();
private static ParameterNameProvider provider = new DefaultParameterNameProvider();
@Override
public List<String> getParameterNames(Constructor<?> constructor) {
String[] parameterNames = discoverer.getParameterNames(constructor);
return Optional.ofNullable(parameterNames).map(Arrays::asList).orElse(provider.getParameterNames(constructor));
}
@cshijiel
cshijiel / github.css
Created July 1, 2018 14:18
github.css for Typora
:root {
--side-bar-bg-color: #fafafa;
--control-text-color: #777;
}
@include-when-export url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,700,400&subset=latin,latin-ext);
@font-face {
font-family: 'Open Sans';
font-style: normal;
@cshijiel
cshijiel / calculateOvertimeSalary.js
Last active October 31, 2018 15:04
短小快命令
var sum = 0.0;
for(var i = 0;i<$('span[id^=showDt]').length;i++){
var temp = parseFloat($($('span[id^=showDt]')[i]).text());
sum+= temp;
}
console.log(sum*4*150)