Skip to content

Instantly share code, notes, and snippets.

@mopperwhite
mopperwhite / js
Created June 6, 2017 18:54
如何在Chrome上批量删除微博
let start_at = 0 // 从第0个开始删
let end_at = 10 // 删到第9个
let aa=Array.prototype.slice.apply(document.querySelectorAll('.WB_feed_detail .W_ficon.ficon_arrow_down.S_ficon')).slice(start_at,end_at)
for(let i=0; i<aa.length; i++){
setTimeout( () => {
aa[i].click()
document.querySelector('[title="删除此条微博"]').click()
document.querySelector('.layer_mini_opt .W_btn_a').click()
}, i*1000)
}
@challengeYY
challengeYY / hostloc.py
Last active April 10, 2019 09:57
hostloc论坛每日翻牌
#encoding=utf-8
import requests
from bs4 import BeautifulSoup
import re
import sys
import datetime
uid="11111" #用户名
pwd="11111" #密码
@woods
woods / geoip.sh
Last active April 24, 2023 01:03
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
@cnDelbert
cnDelbert / How to install tcpping on Linux.md
Last active March 18, 2024 14:27
How to install tcpping on Linux

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
#!/usr/bin/env python2
#
# Find and replace tracker urls in a Deluge torrents.state
import os
import sys
import platform
import shutil
import cPickle