Skip to content

Instantly share code, notes, and snippets.

@hnuzhoulin
hnuzhoulin / nginx.conf
Created July 25, 2023 07:55 — forked from morhekil/nginx.conf
Full request/response body logging in nginx
http {
log_format bodylog '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time '
'<"$request_body" >"$resp_body"';
lua_need_request_body on;
set $resp_body "";
body_filter_by_lua '
  1. 通过 pip install pandora-chatgpt 安装依赖。
  2. 保存以下代码到auto_pool_token.py文件。
  3. 同目录新建文件credentials.txt一行一个账号密码。
  4. 账号和密码之间用,分隔,不需要额外的引号。
  5. 如果需要修改代理,unique_name等,自行修改再运行。
  6. 运行这个auto_pool_token.py
  7. 你会看到运行进度,运行完成可看到pool token
  8. 运行中间结果分别保存在同目录tokens.txtshare_tokens.txt中。
@hnuzhoulin
hnuzhoulin / README.md
Created July 24, 2022 14:34 — forked from engalar/README.md
mendix offline install

使用方法

运行效果

Active code page: 65001
已经存在 listing.txt

请选择一个你想要安装的Studio Pro版本号?
[162] 9.9.2.35886
@hnuzhoulin
hnuzhoulin / polipo_set_up.md
Created November 8, 2018 03:08 — forked from yangwe1/polipo_set_up.md
my polipo conf file

openwrt,用于缓存服务器 其web控制界面位于http://192.168.1.1:8123/polipo/

# polipo daemon configuration
config 'polipo' 'daemon'
	# daemonise polipo (fork in background)
	option 'daemonise' '1'
	# where polipo will store its process pid
	option 'pidFile' '/var/run/polipo.pid'

To install tcptraceroute on Debian/Ubuntu:

$ sudo apt-get install tcptraceroute

To install tcptraceroute on CentOS/REHL, first set up RepoForge on your system, and then:

$ sudo yum install tcptraceroute
@hnuzhoulin
hnuzhoulin / pg_subfolder_splitting.sh
Last active May 29, 2018 12:09 — forked from drakonstein/pg_subfolder_splitting.sh
Split Ceph Filestore OSDs offline
#!/bin/bash
merge_num=-2
split_num=16
while [[ "$(ceph health)" != "HEALTH_OK" ]]; do
sleep 10
done
# Some method to set your ceph.conf file to the subfolder splitting settings you want.
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
__author__ = 'Nisests'
import requests
from bs4 import BeautifulSoup
login_url = 'https://www.packtpub.com/'
accout_url = 'https://www.packtpub.com/account'
@hnuzhoulin
hnuzhoulin / seafile-backup.sh
Created June 6, 2017 07:39 — forked from 3c7/seafile-backup.sh
Seafile backup script
#!/bin/bash
###############################
# Seafile server backup script (cold sqlite backup)
# Author: Nils Kuhnert
# Last change: 2014-07-27
# Website: 3c7.me
###############################
# Variables
DATE=`date +%F`
@hnuzhoulin
hnuzhoulin / seamake.sh
Created June 6, 2017 06:50 — forked from theclanks/seamake.sh
seafile client build
#!/usr/bin/env bash
yum install vala vala-compat wget gcc libevent-devel openssl-devel gtk2-devel libuuid-devel sqlite-devel jansson-devel intltool cmake qt-devel fuse-devel
echo "Building and installing seafile client"
export version=4.2.8 # change this to your preferred version
alias wget='wget --content-disposition -nc'
wget https://github.com/haiwen/libsearpc/archive/v3.0.2.tar.gz
wget https://github.com/haiwen/ccnet/archive/v${version}.tar.gz
@hnuzhoulin
hnuzhoulin / AllResolutions.ps1
Created May 25, 2017 08:01 — forked from mintsoft/AllResolutions.ps1
Powershell for getting all resolutions from all monitors
$pinvokeCode = @"
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
namespace Resolution
{
[StructLayout(LayoutKind.Sequential)]
public struct DEVMODE1
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]