Skip to content

Instantly share code, notes, and snippets.

View punkmonday's full-sized avatar

fff punkmonday

View GitHub Profile
@punkmonday
punkmonday / .vsvimrc
Last active September 7, 2023 06:03
visual studio 2022 config
set ai
"自动缩进宽度
set sw=4
set ts=4
"关闭高亮显示
set nohlsearch
set is
set ignorecase
set smartcase
@punkmonday
punkmonday / ChatGPT.java
Created April 18, 2023 12:16
chatgpt写的chatgpt
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.json.JSONObject;
public class ChatGPT {
@punkmonday
punkmonday / .ideavimrc
Last active August 22, 2023 12:33
my .ideavimrc
"" Source your .vimrc
"source ~/.vimrc
"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set number relativenumber
set idearefactormode=keep
set ideajoin
set surround
@punkmonday
punkmonday / settings.json
Created October 21, 2021 02:50
winterminal设置默认打开路径加"startingDirectory": "D:\\IdeaProjects"
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
},
@punkmonday
punkmonday / dev.ps1
Last active November 26, 2021 02:35
使用scoop安装java所需开发环境
# 使用scoop安装java所需开发环境
$Env:HTTP_PROXY = "http://127.0.0.1:8889"
$Env:HTTPS_PROXY = "http://127.0.0.1:8889"
scoop
if (!$?) {
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
iwr -useb get.scoop.sh | iex
}
scoop bucket add java
scoop bucket add extras
@punkmonday
punkmonday / source2log.bat
Created October 14, 2021 06:36
source folder to a log file
@echo off
REM 文件过滤器
set file_filter=*.java *.js *.css
REM 指定原目录
set src_dir=D:\IdeaProjects\agk-health
REM 指定输出文件
set output_file=D:\IdeaProjects\wordcount\a.log
cd %src_dir%
@punkmonday
punkmonday / DateUtil.java
Created September 28, 2021 02:18
datetime converter by a spec pattern
package com.agk.voice.util;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
public class DateUtil {
public static String processDate(String dateTime) {
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("EEE MMM dd HH:mm:ss zzz yyyy");
LocalDateTime localDateTime = LocalDateTime.parse(dateTime, dateTimeFormatter);
@punkmonday
punkmonday / MachineGuessNumber.java
Created September 17, 2021 06:54
given a number let machine guess don't lie
import java.util.Random;
import java.util.Scanner;
/**
* given a number let machine guess don't lie
* 0 - true 1 -false
*/
public class MachineGuessNumber {
public static void main(String args[]) {
@punkmonday
punkmonday / FileTransJavaDemo.java
Created August 20, 2021 02:03
阿里云语音识别对话
package com.alibaba.nls.client;
import com.alibaba.fastjson.JSONObject;
import com.aliyuncs.CommonRequest;
import com.aliyuncs.CommonResponse;
import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.profile.DefaultProfile;
@punkmonday
punkmonday / pom.xml
Last active January 28, 2021 10:07
springblade dockerfile-maven-plugin config
<docker.repository.url>harbor.fxb.com:5000</docker.repository.url>
<docker.repository.name>blade</docker.repository.name>
<docker.plugin.version>1.4.13</docker.plugin.version>
<dockerfile.skip>true</dockerfile.skip>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>