Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

冯靖 ameizi

🎯
Focusing
View GitHub Profile
View source.yaml
# 模糊抓取订阅链接
- type: webfuzzsub
options:
url: https://raw.githubusercontent.com/oouxx/fqsub/master/sub.list
- type: webfuzzsub
options:
url: https://github.com/doudoubinga/ceshi/blob/master/trash/base64-sub
- type: webfuzzsub
options:
url: https://github.com/JACKUSR2089/v2ray-subscribed
@ameizi
ameizi / spring-data-rest-notes.md
Created Sep 10, 2020 — forked from TomyJaya/spring-data-rest-notes.md
Spring Data REST - Useful notes
View spring-data-rest-notes.md

How To change baseUri:

in application.properties add:

spring.data.rest.basePath=/api
  • or -

in application.yml add:

View gist:64a681e1050c0536c9ab854ada535606
# Docker aliases (shortcuts) and function
# List all containers by status using custom format
alias dpsa='docker ps -a --format "table {{.Names}}\t{{.Image}}\t{{.Status}}"'
# Removes a container, it requires the container name \ ID as parameter
alias drm='docker rm -f'
# Removes an image, it requires the image name \ ID as parameter
alias drmi='docker rmi'
@ameizi
ameizi / cleanup.sh
Created Aug 31, 2019 — forked from superseb/cleanup.sh
Cleanup host added as custom to Rancher 2.0
View cleanup.sh
#!/bin/sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
@ameizi
ameizi / jd.js
Last active Jul 7, 2019
JD自动评价
View jd.js
/**
浏览器打开www.jd.com登录账号,按F12点击Console->复制下列代码->粘贴回车键坐等即可
*/
document.body.innerHTML = "";$("html").css("overflow","hidden");$("body").append('<div id="topTitle" style="padding:20px;display:block;font-size:48px;color:#FFFFFF;background-color:#e2231a;width:100%;text-align:center">京东自动评价JS脚本 </div><iframe src="https://club.jd.com/myJdcomments/myJdcomment.action?sort=0" style="width:99%;height:800px" id="JDifr"></iframe>');$("#J-global-toolbar").remove();let isFiveStar = true;$("#topTitle").click(function(){(isFiveStar = !isFiveStar) ? $("#topTitle").css("background-color","#e2231a"):$("#topTitle").css("background-color","#8B0000");});let pendingNum = 1;let waitSubmitIds;let curId = 0;let maxCurId = 0;$("#JDifr").load(function(){if($("#JDifr").attr("src").indexOf("sort") > 0){pendingNum = ($("#JDifr").contents().find("a.text:first").siblings().length>0 && $("#JDifr").contents().find("a.text:first").attr("href")=="?sort=0")?parseInt($("#JDifr").contents().find("a.text:first").next().text()):0;waitSubmitIds = $("#
@ameizi
ameizi / DateUtils.java
Created Jan 2, 2019
java 8日期转化
View DateUtils.java
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
public class DateUtils {
public static Date asDate(LocalDate localDate) {
return Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant());
View .surge.conf
# 规则配置仅供参考,适用于 Surge Mac (1.0.7) 及其后续版本;
# 包含 Proxy Group、URL Rewrite 特性;
# 包含 Reject 规则,用于拦截广告、行为分析、数据统计;
# 屏蔽 Hao123、百度搜索,放行百度地图、百度外卖、百度音乐、百度云盘、百度百科。
[General]
# warning, notify, info, verbose
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local
bypass-tun = 0.0.0.0/8, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
loglevel = notify
@ameizi
ameizi / CrawlZCFG.java
Created Jan 21, 2015
webmagic爬虫示例
View CrawlZCFG.java
import java.util.ArrayList;
import java.util.List;
import us.codecraft.webmagic.Page;
import us.codecraft.webmagic.Site;
import us.codecraft.webmagic.Spider;
import us.codecraft.webmagic.processor.PageProcessor;
/**
* 爬取http://www.tianyisw.com/ 政策法规数据
@ameizi
ameizi / jenv.md
Created Sep 15, 2014
Mac下同时安装多个版本的JDK
View jenv.md

Mac下同时安装多个版本的JDK

Mac自带了的JDK6,安装在目录:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/下。

JDK7,JDK8则需要自己到Oracle官网下载安装对应的版本。自己安装的JDK默认路径为:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk

1. 在用户目录下的bash配置文件.bashrc中配置JAVA_HOME的路径:

export JAVA_6_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
You can’t perform that action at this time.