Skip to content

Instantly share code, notes, and snippets.

SgDylan Sg4Dylan

Block or report user

Report or block Sg4Dylan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Sg4Dylan
Sg4Dylan / bilibili_download_them_all.py
Last active Nov 6, 2019
通过You-get批量下载Bilibili合集视频
View bilibili_download_them_all.py
#!/usr/bin/env python
#coding:utf-8
# Author: Sg4Dylan --<sg4dylan#gmail.com>
# Purpose: A simple script to download video from Bilibili
# Created: 08/07/2016
import sys
from subprocess import call
def check_and_go(args):
@Sg4Dylan
Sg4Dylan / viewer_image_0.1.8_2018-02-09.js
Last active Oct 2, 2019
bookwalker.com.tw online reader DRM
View viewer_image_0.1.8_2018-02-09.js
This file has been truncated, but you can view the full file.
/**
Open Source Software Licenses
PUBLUS
Copyright(c) 2013-2014 ACCESS CO., LTD. All rights reserved.
This software includes all or part of the following open source software which is available under each license terms and conditions as follows:
* Backbone.js 0.9.2
@Sg4Dylan
Sg4Dylan / BH1750_CTL.ino
Created Jun 24, 2019
显示器亮度自动调节套装
View BH1750_CTL.ino
#include <Wire.h>
#include <BH1750.h>
BH1750 lightMeter;
void setup(){
Serial.begin(9600);
// Initialize the I2C bus (BH1750 library doesn't do this automatically)
// On esp8266 devices you can select SCL and SDA pins using Wire.begin(D4, D3);
Wire.begin();
@Sg4Dylan
Sg4Dylan / pixiv-file-rename.py
Last active May 30, 2019
给 Pixiv 下载的图片重命名
View pixiv-file-rename.py
#!/usr/bin/env python
#coding:utf-8
# Author: Sg4Dylan --<sg4dylan#gmail.com>
# Created: 12/31/2018
# ==========================================
# Pixiv 图片重命名
# ==========================================
# 使用方法: 把待处理的「文件夹」拖放到脚本上
@Sg4Dylan
Sg4Dylan / utorrent_autoban.py
Last active May 29, 2019
uTorrent 自动屏蔽迅雷
View utorrent_autoban.py
import re
import os
import json
import time
import base64
import requests
ipfilter_path = r'D:\Program Files (x86)\uTorrent\ipfilter.dat' # ipfilter.dat 路径
remote_url = 'http://127.0.0.1:23333/gui/' # uTorrent 使用的 WebUI 地址
username = b'admin' # WebUI 使用的用户名
@Sg4Dylan
Sg4Dylan / EhTagTranslatorWrapper.py
Created Jan 5, 2019
E绅士翻译注射器💉Wiki 解析实现
View EhTagTranslatorWrapper.py
'''
E绅士翻译注射器💉Wiki 解析实现
直接用 EhTagBuilder 就能拿到 JSON 格式的数据库
本脚本是为方便集成做的简易版解析实现
参考了 EhTagTranslator 的实现过程
'''
import re
import json
import requests
@Sg4Dylan
Sg4Dylan / batch_img_convert.py
Created Sep 28, 2018
图片原地批量转换
View batch_img_convert.py
#!/usr/bin/env python
#coding:utf-8
# Author: Sg4Dylan --<sg4dylan#gmail.com>
# Created: 9/28/2018
# ==========================================
# Any>WEBP Any>JPEG 图片原地批量转换
# ==========================================
# 使用方法: 把待转换的文件夹拖放到脚本上
import os
@Sg4Dylan
Sg4Dylan / NginxAutoindexExporter.js
Last active Sep 15, 2018
配合 phuslu 的 autoindex,实现 nginx 自动列目录导出到 aria2
View NginxAutoindexExporter.js
// ==UserScript==
// @name NginxAutoindexExporter
// @namespace http://tampermonkey.net/
// @version 20180915(0.2)
// @description Export link from nginx autoindex to aria2
// @author SgDylan
// @match https://example.com/*
// @grant none
// ==/UserScript==
@Sg4Dylan
Sg4Dylan / viewer_loader_0.1.8_2018-02-09.js
Last active May 20, 2018
bookwalker.com.tw online reader DRM
View viewer_loader_0.1.8_2018-02-09.js
/**
Open Source Software Licenses
PUBLUS
Copyright(c) 2013-2014 ACCESS CO., LTD. All rights reserved.
This software includes all or part of the following open source software which is available under each license terms and conditions as follows:
* LAB.js (LABjs :: Loading And Blocking JavaScript)
v2.0.3 (c) Kyle Simpson
@Sg4Dylan
Sg4Dylan / getLiveComment.py
Last active Feb 14, 2018
简单的Bilibili直播弹幕抓取实现
View getLiveComment.py
#!/usr/bin/env python
import socket
import binascii
import threading
import time
import json
reconnect_flag = 0
You can’t perform that action at this time.