Skip to content

Instantly share code, notes, and snippets.

View cbdyzj's full-sized avatar
🐱

阿尔贝鲁 cbdyzj

🐱
View GitHub Profile
@cbdyzj
cbdyzj / tsconfig.json
Created October 30, 2025 14:27
tsconfig.json
{
"compilerOptions": {
"strict": true,
"target": "ES2020",
"module": "ES2022",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"moduleResolution": "bundler",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
@cbdyzj
cbdyzj / tsconfig-5.7.md
Created October 20, 2025 15:12
tsconfig-5.7
@cbdyzj
cbdyzj / Lu.java
Last active September 26, 2025 06:08
Lu.java
import module java.net.http;
private static final HttpClient HTTP_CLIENT = HttpClient.newBuilder()
.followRedirects(HttpClient.Redirect.NORMAL)
.connectTimeout(Duration.ofSeconds(10))
.build();
void main() {
var mavenRepo = Optional.ofNullable(System.getenv("MAVEN_REPO")).filter(s -> !s.isBlank()).orElse("https://repo1.maven.org/maven2");
IO.println("Using Maven repository: " + mavenRepo);
@cbdyzj
cbdyzj / gradle_ss.md
Last active April 14, 2025 10:57
gradle_ss.md

Use socks proxy

./gradlew build -DsocksProxyHost='127.0.0.1' -DsocksProxyPort=1080
@cbdyzj
cbdyzj / changeInputValue.js
Created March 1, 2025 03:26
changeInputValue.js
export function changeInputValue(input, value) {
if (input) {
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value').set
nativeInputValueSetter.call(input, value)
const inputEvent = new Event('input', { bubbles: true })
input.dispatchEvent(inputEvent)
}
}
@cbdyzj
cbdyzj / piaotia.user.js
Last active March 1, 2025 03:26
piaotia-amend
// ==UserScript==
// @name piaotia-amend
// @namespace piaotia-amend
// @match https://www.piaotia.com/*
// @grant none
// @version 1.0
// @author Aerbeilu
// @description 2025/2/15 15:54:23
// ==/UserScript==
@cbdyzj
cbdyzj / proxy_for_git.sh
Created January 26, 2024 14:48
Set proxy for Git
# Method 1. git http + proxy http
git config --global http.proxy "http://127.0.0.1:1080"
git config --global https.proxy "http://127.0.0.1:1080"
# Method 2. git http + proxy shocks
git config --global http.proxy "socks5://127.0.0.1:1080"
git config --global https.proxy "socks5://127.0.0.1:1080"
# to unset
git config --global --unset http.proxy
@cbdyzj
cbdyzj / open_google_chrome_disable_web_security.sh
Created May 6, 2023 13:43
open Google Chrome disable web security
open -n -a 'Google Chrome' 'https://github.com/' --args --user-data-dir='/tmp/chrome_dev_0' --disable-web-security --allow-running-insecure-content
@cbdyzj
cbdyzj / NameHash.jsx
Created April 10, 2022 01:28
NameHash.jsx
import React, { useState } from 'react'
import styled from '@emotion/styled'
import murmur3 from '../../utils/murmurhash3_32.js'
const Container = styled.div`
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
height: 75vh;
@cbdyzj
cbdyzj / XNano.jsx
Created April 10, 2022 01:15
XNano.jsx
import React, { Component, useRef } from 'react'
import styled from '@emotion/styled'
import { sleep } from '../../utils/schedule.js'
const Container = styled.div`
box-sizing: border-box;
position: relative;
display: flex;
flex-direction: column;
justify-content: center;