Skip to content

Instantly share code, notes, and snippets.

@chenqiyue
chenqiyue / twitter_deleter.js
Last active March 16, 2021 14:50
twitter deleter
document.querySelector(".Icon--caretDownLight").click();
setTimeout(()=>{
document.querySelector(".js-actionDelete button.dropdown-link").click();
setTimeout(()=>{
document.querySelector(".delete-action").click();
},300)
}
,300);
import lombok.Setter;
import lombok.experimental.Accessors;
import org.jetbrains.annotations.NotNull;
import java.util.Iterator;
import java.util.function.BiFunction;
/**
* 支持翻页遍历的Iterable
*
@chenqiyue
chenqiyue / .gitconfig
Created May 4, 2018 03:49
copy from babun
[alias]
cp = cherry-pick
st = status
cl = clone
ci = commit
co = checkout
br = branch
dc = diff
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cblue<%an>%Creset' --abbrev-commit --date=relative --all
last = log -1 --stat
import org.bouncycastle.asn1.x9.X9ECParameters;
import org.bouncycastle.asn1.x9.X9IntegerConverter;
import org.bouncycastle.crypto.ec.CustomNamedCurves;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.math.ec.ECAlgorithms;
import org.bouncycastle.math.ec.ECPoint;
import org.bouncycastle.math.ec.custom.sec.SecP256K1Curve;
import org.web3j.crypto.ECDSASignature;
import org.web3j.crypto.Hash;
import org.web3j.crypto.Keys;
@chenqiyue
chenqiyue / TomcatGracefulShutdown.java
Created December 4, 2017 08:46
Spring boot Tomcat GracefulShutdown
package com.laobai.boot.tomcat;
import org.apache.catalina.connector.Connector;
import org.springframework.boot.context.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
package com.laobai.distributed;
import org.springframework.core.NestedRuntimeException;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;
@chenqiyue
chenqiyue / CaptchaAdapter.java
Created September 2, 2017 16:05
adapter for patchca-captcha
import org.patchca.color.ColorFactory;
import org.patchca.filter.FilterFactory;
import org.patchca.filter.predefined.CurvesRippleFilterFactory;
import org.patchca.filter.predefined.DiffuseRippleFilterFactory;
import org.patchca.filter.predefined.DoubleRippleFilterFactory;
import org.patchca.filter.predefined.MarbleRippleFilterFactory;
import org.patchca.filter.predefined.WobbleRippleFilterFactory;
import org.patchca.service.Captcha;
import org.patchca.service.ConfigurableCaptchaService;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.Future;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**