Skip to content

Instantly share code, notes, and snippets.

@imbyc
imbyc / time33.php
Last active March 22, 2023 02:50
[PHP 一致性哈希算法 time33算法]
<?php
/**
* time33 函数
* @param string $str
* @return 32位正整数
* @author 大神们
*/
function time33($str)
{
@imbyc
imbyc / autoclick.js
Created March 1, 2022 07:11
[js 自动点击]
var ts = 2;//间隔时间 秒
var JQuery=$;
function getHb(){
if(JQuery("div[clk='core:close']")!=null){
JQuery("div[clk='core:close']").click();
}
JQuery(".bg").click();
}
window.setInterval(getHb,ts*1000);
@imbyc
imbyc / Windows 11 Classic Context Menu.bat
Last active February 16, 2022 06:38
[Windows 11 Classic Context Menu] 还原windows11旧的邮件菜单 #windows11 #win11 #win11邮件菜单 #Windows11ClassicContextMenu
@echo off
title windows 11 还原经典菜单(windows 11 Classic Context Menu)
mode con cols=80 lines=20
::https://www.sordum.org/14479/windows-11-classic-context-menu-v1-1/
:MENU
echo -------------------------------------------
@imbyc
imbyc / fileSafeRead.php
Created May 11, 2021 09:27
[PHP 并发下安全读写文件函数] https://mkblog.cn/1831/ 使用flock
<?php
/**
* @link http://kodcloud.com/
* @author warlee | e-mail:[email protected]
* @copyright warlee 2014.(Shanghai)Co.,Ltd
* @license http://kodcloud.com/tools/license/license.txt
*/
@imbyc
imbyc / docker-cleanup-resources.md
Created April 16, 2021 04:09 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks Docker清理

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@imbyc
imbyc / Qv2ray-default-route-config.json
Last active January 18, 2023 09:47
[Qv2ray 配置文件]
{
"author": "byc <[email protected]>",
"description": "Qv2ray默认路由设置",
"domainStrategy": "IPIfNonMatch",
"domains": {
"block": [
"geosite:category-ads-all"
],
"direct": [
"geosite:tld-cn",
@imbyc
imbyc / .gitconfig
Created March 15, 2021 04:16
[git 配置文件 .gitconfig] %HOMEPATH%/.gitconfig #git
[user]
name = byc
email = [email protected]
[core]
autocrlf = true
[http]
proxy = http://127.0.0.1:10809
[https]
proxy = https://127.0.0.1:10809
@imbyc
imbyc / .npmrc
Last active March 15, 2021 04:12
[NodeJS NPM 全局配置文件] %HOMEPATH%/.npmrc #nodejs #npm
registry=https://registry.npm.taobao.org/
cache=D:\devtools\Node\nvm\node_cache
prefix=D:\devtools\Node\nvm\node_global
@imbyc
imbyc / .leptonrc
Last active March 22, 2023 01:32
[Lepton 配置文件] 自用Lepton 配置文件备份 Lepton v1.9.1 v1.10.0
{
"theme": "light",
"snippet": {
"expanded": true,
"newSnippetPrivate": false,
"sorting": "updated_at",
"sortingReverse": true
},
"editor" : {
"tabSize": 4,
@imbyc
imbyc / send.sh
Last active March 2, 2021 02:58
[shell 调用企业微信接口发送通知] 使用curl发送 https://work.weixin.qq.com/api/doc/90000/90135/90236
#!/bin/bash
# 发送微信通知
# 企业ID https://work.weixin.qq.com/api/doc/90000/90135/90665#corpid
CORPID=填写企业ID
# 应用的凭证密钥 https://work.weixin.qq.com/api/doc/90000/90135/90665#secret
CORPSECRET=填写应用的凭证密钥
# 企业应用的id ,整型。企业内部开发,可在应用的设置页面查看
AGENTID=填写企业应用的id
# 获取token的接口地址 https://work.weixin.qq.com/api/doc/90000/90135/91039