Skip to content

Instantly share code, notes, and snippets.

@BFDZ
BFDZ / uwsgi_config.ini
Last active June 15, 2019 14:49
uwsgi_config.ini
[uwsgi]
# 采用sock方式通信,程序在启动时会自己创建这个文件
socket = /tmp/uwsgi.sock
pidfile = /tmp/uwsgi.pid
vacuum = true
# 指向网站目录
chdir = /home/wwwroot/gen.bfdz.ink
# python 启动程序文件
wsgi-file = app.py
# python 程序内用以启动的 application 变量名
@BFDZ
BFDZ / bbr.sh
Created June 2, 2019 11:50
bbr.sh
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
sysctl net.ipv4.tcp_available_congestion_control
lsmod | grep bbr
@BFDZ
BFDZ / bulk_download.sh
Created March 30, 2019 08:08
一个简单的 bash 批量下载模版
#!/usr/bin/env bash
page_url=''
for ((i=1; i<=2310; i++))
do
page_i="${page_url}$i.html"
mp3_i_url=$(curl -s ${page_i} |grep soundFile | awk -F\" '{print $20}')
mp3_i_name=$(curl -s ${page_i} |grep soundFile | awk -F\" '{print $22}')
curl -o "$mp3_i_name" ${mp3_i_url}
@BFDZ
BFDZ / hostloc.py
Last active April 15, 2019 02:33 — forked from challengeYY/hostloc.py
hostloc论坛每日翻牌
#!/usr/bin/python
#encoding=utf-8
import requests
from bs4 import BeautifulSoup
import re
import sys
import datetime
uid="11111" #用户名
@BFDZ
BFDZ / zimuzu-sign.sh
Last active December 28, 2020 03:32
字幕组网站签到
#!/bin/bash
ACCOUNT="user"
PASSWORD="123456"
#########################################
function urlEncode() {
python -c "
import urllib, commands, os;
@BFDZ
BFDZ / status.sh
Last active March 29, 2018 15:58
#!/bin/bash
### BEGIN INIT INFO
# Provides: status
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: status
@BFDZ
BFDZ / geoip.sh
Last active December 1, 2017 03:40 — forked from woods/geoip.sh
iptables geoip xtables firewall by country
# This is an example of how to use xtables / xt_geoip to block requests
# based on their source/destination country.
#
# It can be computationally expensive to have tons of iptables rules.
# According to the bottom of the following page, this xt_geoip is probably
# about as efficient as can be for doing this kind of thing:
# http://xtables-addons.sourceforge.net/geoip.php
# Install packages
apt-get install xtables-addons-common libtext-csv-xs-perl unzip
@BFDZ
BFDZ / check_size.sh
Last active November 21, 2017 14:07
#!/bin/bash
limit=92
dir=/home/bfdz/rtorrent/downloads/
v_mail=
log=/var/log/check_size.log
flag=0
while [ 1 ]
do
@BFDZ
BFDZ / 2dto3d.avs
Last active March 30, 2019 08:10 — forked from LunNova/2dto3d.avs
Avisynth 2D 画面转制左右 3D 画面
## 2D to 3D Realtime Video Conversion Avisynth script v0.3b
## Made by Anton Belev at 3D Vision Blog
## http://www.3dvision-blog.com
## Additionally extended by Martin Haverland at audiomh.de for quality resize
## and different output modes including interlaced format for use in non-3d specific players e.g. windows media player.
#modified by /u/nallar
#Replace all LanczosResize to LanczosResize if performance is bad.
#SetMTMode(2,0)#Uncomment if you have multithreaded avisynth!
@BFDZ
BFDZ / vpsins.sh
Last active December 7, 2023 13:23
vps 开通后常用的操作
#!/bin/bash
cd ~
clear
echo "#########################################################################"
echo "# File Name: vpsins.sh"
echo "# Version: 2.0.6"
echo "# System Required: Debian, Ubuntu"
echo "# Author: bfdz"