Skip to content

Instantly share code, notes, and snippets.

View Sg4Dylan's full-sized avatar
🐱

SgDylan Sg4Dylan

🐱
View GitHub Profile
@Sg4Dylan
Sg4Dylan / viewer_image_0.1.8_2018-02-09.js
Last active March 25, 2024 00:18
bookwalker.com.tw online reader DRM
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
(c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
@Sg4Dylan
Sg4Dylan / Lightpack.ino
Created June 6, 2020 03:22
Lightpack 开源破车
/*
* Arduino interface for the use of WS2812 strip LEDs
* Uses Adalight protocol and is compatible with Boblight, Prismatik etc...
* "Magic Word" for synchronisation is 'Ada' followed by LED High, Low and Checksum
* @author: Wifsimster <wifsimster@gmail.com>
* @library: FastLED v3.001
* @date: 11/22/2015
*/
#include <FastLED.h>
#define NUM_LEDS 50 // 设置灯珠总数(貌似不能超过 400 个
@Sg4Dylan
Sg4Dylan / qb-ban-vampire.py
Last active January 26, 2024 02:30
qBittorrent block vampire peers. qBittorrent 屏蔽吸血客户端.
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Author: Sg4Dylan -- <sg4dylan#gmail.com>
# Licence: GPLv3
import requests
import re
import json
import time
@Sg4Dylan
Sg4Dylan / get_play_status_from_netease_music.py
Last active October 10, 2023 07:31
网易云音乐远程控制
#!/usr/bin/env python
#coding:utf-8
# Author: Sg4Dylan -- <sg4dylan#gmail.com>
# Update: 10/13/2017
'''
透过 Chrome Debug Protocol 读取网易云音乐当前播放状态
启动播放器时附带启动参数
--remote-debugging-port=8080
@Sg4Dylan
Sg4Dylan / viewer_loader_0.1.8_2018-02-09.js
Last active September 12, 2023 15:09
bookwalker.com.tw online reader DRM
/**
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 / biliplus_exporter.js
Last active August 7, 2023 08:09
导出 biliplus 下载链接,并简单合并下载的视频分片
// 显示下载链接的侧边栏加载完成后,在 Console 复制这段 JS 并执行
// 执行完成后,鼠标选中一组链接,ctrl+c 复制到 aria2 即可批量下载视频
// 格式化版
var total_area = document.getElementById('geturl_content');
var split_area = total_area.getElementsByTagName('div');
var itemDocs = [];
for (let i=0;i<split_area.length;i++) {
if(split_area[i].style[0]=="width") {
itemDocs.push(split_area[i]);
@Sg4Dylan
Sg4Dylan / qbittorrent_rss_cleaner.py
Created May 30, 2023 07:24
Remove outdated RSS records for qBittorrent
import os
import json
import re
from datetime import datetime, timedelta
rss_json = ''
for i in os.listdir('.'):
if i.endswith('.json'):
rss_json = i
@Sg4Dylan
Sg4Dylan / bilibili_download_them_all.py
Last active April 15, 2023 16:32
通过You-get批量下载Bilibili合集视频
#!/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 / BH1750_CTL.ino
Created June 24, 2019 12:58
显示器亮度自动调节套装
#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 / build_win64.yml
Created January 28, 2022 10:53
GitHub action workflow for building OBS plugin obs-libfdk on win64 platform
name: 'CI Build'
on:
push:
paths-ignore:
- '**.md'
branches:
- master
- 'release/**'
tags: