brew install ripgrep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
auto-gpt: | |
image: significantgravitas/auto-gpt | |
depends_on: | |
- redis | |
env_file: | |
- .env | |
environment: | |
MEMORY_BACKEND: ${MEMORY_BACKEND:-redis} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// #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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.all '!f() { ls -R -d */.git | xargs -I{} bash -c "echo {} && git -C {}/../ $1"; }; f' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
以下过程是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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 后台打包并分卷 | |
nohup tar -cvf - package | split -b 1024m -d - package.tar > logs.txt 2>&1 & | |
# 打包压缩并分卷 | |
tar -cvzf - package | split -b 1024m -d - package.tar.gz |
NewerOlder