Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

冯靖 ameizi

🎯
Focusing
View GitHub Profile
@ameizi
ameizi / acme_docker.sh
Created Jun 30, 2022 — forked from stilleshan/acme_docker.sh
基于 docker 环境 acme.sh 申请 Let's Encrypt 泛域名证书的交互式一键脚本.
View acme_docker.sh
#!/usr/bin/env bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
# fonts color
Green="\033[32m"
Red="\033[31m"
Yellow="\033[33m"
GreenBG="\033[42;37m"
RedBG="\033[41;37m"
@ameizi
ameizi / docker-compose.yaml
Created Jan 6, 2022 — forked from coltenkrauter/docker-compose.yaml
Traefik V2 Docker Compose file with LetsEncrypt and HTTPS redirect - Traefik dashboard and simple whoami service
View docker-compose.yaml
# Tutorial: https://blog.creekorful.com/2020/01/how-to-expose-traefik-2-dashboard-securely-docker-swarm/
version: '3'
services:
reverse-proxy:
image: traefik:2.3
command:
# - '--log.level=DEBUG'
- '--api=true'
- '--api.dashboard=true'
View gist:4f3b13b14e67b24fda9c6956c95aef5e
package com.example.anchnet;
import org.redisson.api.RRateLimiter;
import org.redisson.api.RateIntervalUnit;
import org.redisson.api.RateType;
import org.redisson.api.RedissonClient;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
@ameizi
ameizi / README.md
Created Jan 24, 2021 — forked from danielepolencic/README.md
Create 3 nodes Kubernetes cluster locally with Vagrant
View README.md

3 Virtual Machines Kubernetes cluster

Dependencies

You should install VirtualBox and Vagrant before you start.

Creating the cluster

You should create a Vagrantfile in an empty directory with the following content:

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());