Skip to content

Instantly share code, notes, and snippets.

View Hootrix's full-sized avatar
💭
I may be slow to respond.

Pang Hootrix

💭
I may be slow to respond.
View GitHub Profile
@Hootrix
Hootrix / GoogleCacheViewer.user.js
Last active July 12, 2024 10:08
Tampermonkey script
// ==UserScript==
// @name Google cache viewer
// @namespace http://hhtjim.com/
// @version 1.0.2
// @description Automatically adds a cache link to Google Search results. / Google搜索结果中添加查看缓存[Cache]功能
// @author Hootrix
// @include https://www.google.tld/search?*
// @grant none
// @license MIT
// ==/UserScript==
@Hootrix
Hootrix / forced.mirror.access.etherscan.io.user.js
Created April 20, 2021 12:58
强制使用国内镜像访问etherscan.io
// ==UserScript==
// @name 强制使用国内镜像访问etherscan.io
// @namespace http://hhtjim.com/
// @version 0.1
// @description 强制以太坊浏览器使用国内镜像!避免cf的访问验证以及代理问题。
// @author You
// @match http://etherscan.io/*
// @match https://etherscan.io/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
@Hootrix
Hootrix / hyss_hw_parse.py
Last active March 14, 2021 10:26
华扬盛世身高体重数据解析
import re as regex
s = b'\xbb\xbc\xbd\xc7\x01\x07\05\x02\x06\x04\x08\x08)'# (175.2, 64.88)
# s = b'\xbb\xbc\xbd\xc7\x01\x07\x06\x06\x06\x05\x02!'# (176.6, 65.2)
# s = b'\xbb\xbc\xbd\xc7\x01\x07\x06\x06\x06\x05\x02!' # (176.6, 65.2)
# s = b'\xfb\x01\x00\x03\t\x01\x00\x05\x03' # 103.0, 10.53
# s = b'\xfb\x01\x00\x03\t\x00\x06\x08\x06' # (103.0, 06.86)
def hyss_hw_parse(series_data,start_position_list = ['c7','fb']):
'''
解析华扬盛世身高体重数据
@Hootrix
Hootrix / readme.md
Last active May 19, 2020 04:43
repair_zip.sh

usage

bash repair_zip.sh /root/3.zip
@Hootrix
Hootrix / wuyong.py
Created April 21, 2020 16:25
无用空间音频下载
"""
无用空间的音频下载
time:2020-04-22
Author:pang
"""
# http://www.timeless-world.org//audio-browse-22.html?s1=30
# http://www.timeless-world.org/svideo-browse-17.html?s1=30
import requests,re as regex
@Hootrix
Hootrix / wechat_group_member_list.js
Created February 14, 2020 06:15
获取微信群成员昵称列表
// 方法:
// 登录微信网页:https://wx.qq.com/
// 打开指定组 -> 点击下拉箭头展示所有成员列表 -> 打开浏览器console控制台执行下面代码:
var list = []
$('.member.ng-scope').each(function(){
var title = $(this).attr('title');
title = title.replace(/<img.*?\/>/g,'').trim()
list.push(title)
});

Keybase proof

I hereby claim:

  • I am hootrix on github.
  • I am oiz (https://keybase.io/oiz) on keybase.
  • I have a public key ASADDbfjcpaWqS399wTCLkSa1SS9kaFVM79x5SMv1_QPpwo

To claim this, I am signing this object:

@Hootrix
Hootrix / fast_read_the_file_in_the_zip.py
Last active October 14, 2019 07:28
快速读取zip压缩包内的文件 支持在线url以及本地path
import requests,tempfile, zipfile,os
def read_file_for_zip(zip_url, callback=None):
"""
读取zip包内的文件
:param zip_url:zip路径/url
:param callback:读取操作的回调函数 若函数返回false 则不会读取下一个文件
:return:
"""
with tempfile.TemporaryFile('w+b') as tmpfile: # 生成临时文件
@Hootrix
Hootrix / tianfu.py
Last active November 11, 2024 09:04
天府市民云APP的消息RSS生成
import datetime
import time
import PyRSS2Gen
import requests, pytz
class NoOutput:
def __init__(self):
pass
def publish(self, handler):
@Hootrix
Hootrix / who_data.py
Last active August 17, 2019 08:07 — forked from HintikkaKimmo/who_data.py
handy way to read csv files with unknown csv dialect
import csv
import pprint
# opens csv file and assingns it to an object
with open('data-text.csv') as csvfile:
# Use Sniffer to figure out csv dialect
dialect = csv.Sniffer().sniff(csvfile.read(1024))
csvfile.seek(0)
# pass the dialect to filereader to read the file
reader = csv.reader(csvfile, dialect)