Skip to content

Instantly share code, notes, and snippets.

View prinsss's full-sized avatar
🐟
摸鱼中

prin prinsss

🐟
摸鱼中
View GitHub Profile
@prinsss
prinsss / gmail-quote-english.user.js
Last active September 14, 2023 07:50
[User Script] Convert Gmail Quote Attribution to English
// ==UserScript==
// @name Convert Gmail Quote Attribution to English
// @namespace http://tampermonkey.net/
// @version 0.2.0
// @description Convert Gmail's attribution line for automatically quoted messages to format in English.
// @author prin
// @license MIT
// @match *://mail.google.com/*
// @match *://gmail.com/*
// @run-at context-menu
@prinsss
prinsss / show-pocket-tags.user.js
Last active September 6, 2023 08:53
A more informative list view for Pocket. Always show the tags of saved items instead of hovering to show.
// ==UserScript==
// @name Show Pocket Tags
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Always show the tags of items saved in Pocket. No more hovering!
// @author You
// @match *://getpocket.com/*
// @icon https://getpocket.com/favicon.ico
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Abema 强制 1080p
// @description 把其他清晰度的播放列表强制指向1080p
// @version 1.1.0
// @run-at document-start
// @namespace Violentmonkey Scripts
// @match https://abema.tv/*
// @grant none
// ==/UserScript==
@prinsss
prinsss / bash-centos.zsh-theme
Last active November 25, 2021 23:07
My custom Zsh themes.
# Default bash prompt of CentOS
# e.g. [user@host current]$
PROMPT="%{$fg_bold[green]%}[%n@%m%{$reset_color%} %{$fg_bold[white]%}%c%{$fg_bold[green]%}]%(!.#.$)%{$reset_color%} "
@prinsss
prinsss / download.php
Created November 26, 2016 09:54
PHP Remote Download with Progress Bar [Backend]
<?php
// 当前文件:download.php
$action = @$_GET['action'];
// 自己获取这些信息
$remote_url = get_remote_file_url();
$file_size = get_remote_file_size($remote_url);
$tmp_path = get_tmp_path();
@prinsss
prinsss / concat.sh
Last active December 14, 2020 15:14
使用 ffmpeg 拼接 Bilibili 客户端所下载的分段 flv 视频,https://blessing.studio/use-ffmpeg-to-concat-flv-videos-downloaded-by-bilibili-client/
# @Author: printempw
# @Date: 2017-05-13 17:54:48
# @Last Modified by: printempw
# @Last Modified time: 2017-05-13 21:37:41
cat /dev/null > ff.txt
# 防止变成 1、10、2、3 这样的顺序
for i in `ls -1 *.flv | sort -n`; do
echo "file '${i}'" >> ff.txt;
@prinsss
prinsss / check_youtube.py
Created July 4, 2019 05:26
Check whether YouTube channel is live streaming.
#!/usr/bin/env python3
# coding: utf-8
import re
import sys
import json
import requests
from retrying import retry
headers = {
@prinsss
prinsss / index.html
Created November 26, 2016 10:07
PHP Remote Download with Progress Bar [Frontend]
<p>更新包大小:<span id="file-size">0</span> Bytes</p>
<!-- 进度条 -->
<div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
<span id="imported-progress">0</span>%
</div>
</div>
<script>
// 更新进度条的函数
@prinsss
prinsss / typora-md.reg
Created April 23, 2020 12:22
修复便携版 VS Code、Typora 的文件类型关联
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.md]
@="Typora.md"
[HKEY_CLASSES_ROOT\.md\OpenWithProgids]
"Typora.md"=""
[HKEY_CLASSES_ROOT\Typora.md]
@="Markdown File"
@prinsss
prinsss / hitokoto.py
Created December 27, 2015 04:32
Python 一言爬虫
#!/usr/bin/env python
# -*- coding=utf-8 -*-
import sys
# Python version check
if (sys.version_info[0] < 3):
print("This script only works on Python 3+.")
exit(1)
import os, time
import urllib.request