Skip to content

Instantly share code, notes, and snippets.

@nailuoGG
nailuoGG / 1_get_words_from_dwarf_fortress.py
Last active January 12, 2024 10:08
矮人要塞 生词 制作anki 卡牌
import requests
from bs4 import BeautifulSoup
import csv
def fetch_and_convert(url):
# Fetch the web page content
response = requests.get(url)
if response.status_code != 200:
return "Failed to retrieve the webpage."
@nailuoGG
nailuoGG / README.md
Last active September 6, 2023 07:41
如何迅速从小程序工程中检查出哪些代码使用了微信隐私api。https://liujiale.me/

如何迅速从工程中检查出哪些代码使用了微信隐私api

install 安装

brew install ripgrep

download private api list

@nailuoGG
nailuoGG / docker-compose.yml
Created May 27, 2023 14:38
start autogpt using docker
version: "3.9"
services:
auto-gpt:
image: significantgravitas/auto-gpt
depends_on:
- redis
env_file:
- .env
environment:
MEMORY_BACKEND: ${MEMORY_BACKEND:-redis}
// #popclip
// name: OpenAI
// icon: iconify:eos-icons:ai
// language: javascript
// after: paste-result
// entitlements: [network]
// options: [{identifier: apikey, label: API Key, type: string,
// description: 'Obtain API key from https://platform.openai.com/account/api-keys'}]
const axios = require("axios");
// base object for communicating with OpenAI
git config --global alias.all '!f() { ls -R -d */.git | xargs -I{} bash -c "echo {} && git -C {}/../ $1"; }; f'
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
@nailuoGG
nailuoGG / downfile.js
Created February 21, 2019 13:58
用于点击链接下载文件
export const downloadFile = (fileName, url) => {
if (isIE()) {
ieDown(url)
} else {
const aLink = document.createElement('a');
const evt = document.createEvent('MouseEvents');
// var evt = document.createEvent("HTMLEvents")
evt.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
aLink.download = fileName;
aLink.href = url;
以下过程是CentOS
1.打开此脚本(使用VIM或其他编辑器):
vim /etc/sysconfig/jenkins
2.找到$JENKINS_USER并更改为“root”:
$JENKINS_USER="root"
3.然后更改Jenkins主页,webroot和日志的所有权:
chown -R root:root /var/lib/jenkins
chown -R root:root /var/cache/jenkins
@nailuoGG
nailuoGG / script.sh
Created May 18, 2018 05:54
分卷打包文件 #linux #tar
# 后台打包并分卷
nohup tar -cvf - package | split -b 1024m -d - package.tar > logs.txt 2>&1 &
# 打包压缩并分卷
tar -cvzf - package | split -b 1024m -d - package.tar.gz