Skip to content

Instantly share code, notes, and snippets.

View JonasGao's full-sized avatar
🙂
Cured ! Thanks God

Jonas Gao JonasGao

🙂
Cured ! Thanks God
  • Earth
  • Big Data
View GitHub Profile
param(
[parameter()]
[ValidateNotNullOrEmpty()]
[string]
$Prof,
[parameter()]
[ValidateNotNullOrEmpty()]
[string]
$Out = "${Prof}.yaml"
[string]
#!/bin/bash
# Other choise
# 2) 腾讯云 docker hub mirror
# https://mirror.ccs.tencentyun.com
# 3) 华为云
# https://05f073ad3c0010ea0f4bc00b7105ec20.mirror.swr.myhuaweicloud.com
# 4) docker中国
# https://registry.docker-cn.com
# 5) 网易
# http://hub-mirror.c.163.com
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.time.format.SignStyle;
import java.util.Random;
import static java.time.temporal.ChronoField.*;
import static java.time.temporal.ChronoField.SECOND_OF_MINUTE;
public class ErrorLogIdBuilder {
@JonasGao
JonasGao / deploy_pki.sh
Last active November 13, 2023 03:17
Deploy nginx pki
#!/bin/bash
TARGET_DOMAIN="$1"
TARGET_TAR="$2"
EXPIRE="$3"
[ "$TARGET_DOMAIN" = "" ] && echo "Missing Parameter 1: domain" && exit 1
[ "$TARGET_TAR" = "" ] && echo "Missing Parameter 2: pki tar" && exit 2
[ ! -f "$TARGET_TAR" ] && echo "Parameter 2: pki tar is not a file" && exit 3
[ "$EXPIRE" = "" ] && EXPIRE="3m" && echo "INFO: Default setup expire 3m"
@JonasGao
JonasGao / config.yaml
Created July 27, 2023 06:35
Bypass for JetBrains AI
DOMAIN-SUFFIX, grazie.aws.intellij.net
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.jetbrains.annotations.NotNull;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.function.Function;
cd $HOME
Invoke-RestMethod https://github.com/PowerShell/PowerShellEditorServices/releases/download/v3.8.7/PowerShellEditorServices.zip -Proxy socks5://127.0.0.1:7891 -OutFile PowerShellEditorServices.zip
Expand-Archive .\PowerShellEditorServices.zip .\PowerShellEditorServices1
$env:ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"
$env:NODE_OPTIONS = "--openssl-legacy-provider"
# https://raw.githubusercontent.com/redis/redis/5.0/redis.conf
requirepass "123456"
maxmemory 512mb
maxmemory-policy allkeys-lru
supervised systemd
daemonize no
#!/bin/bash
# Example:
#
# Get logger level
# ./boot-logger.sh org.springframework.data.mongodb.core.MongoTemplate get
# or
# APP_PORT=8182 ./boot-logger.sh org.springframework.data.mongodb.core.MongoTemplate get
#
# Set logger level