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 / .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 / 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 / SwitchyOmega_Proxy.txt
Last active December 24, 2022 08:22
SwitchyOmega_Proxy
[SwitchyOmega Conditions]
@with result
*.travelclassroom.net +proxy
*.ifeng.com +proxy
*.upstract.com +proxy
*.wangboweb.site +proxy
*.microsoftonline.com +proxy
*.zztongyun.com +proxy
*.okz2.com +proxy
@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 / .vimrc
Last active October 27, 2021 07:30
自定义.vimrc,系统粘贴板生效需要安装vim-X11(fedora) https://vim.fandom.com/wiki/Accessing_the_system_clipboard ps: windows的vimrc在~/_vimrc,可以用:version查看vim env
call plug#begin()
Plug 'easymotion/vim-easymotion'
Plug 'sbdchd/neoformat'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'tpope/vim-surround'
Plug 'jiangmiao/auto-pairs'
Plug 'preservim/nerdtree'
call plug#end()
@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 / 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[]) {