Skip to content

Instantly share code, notes, and snippets.

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

prin prinsss

🐟
摸鱼中
View GitHub Profile
@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 / 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"
{
"configurations": [
{
"name": "MinGW G++",
"intelliSenseMode": "gcc-x64",
"compilerPath": "C:\\Portable\\mingw64\\bin\\g++.exe",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
@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 / 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 / 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 / .travis.yml
Last active November 8, 2018 15:16
Travis CI config for Hexo blog automatic deployment.
language: node_js
node_js: stable
# 只监听 source 分支的改动
branches:
only:
- source
# 缓存依赖,节省持续集成时间
cache:
@prinsss
prinsss / example.js
Created June 25, 2017 05:03
Hexo 访问计数器,前端示例脚本。
/**
* 这里处理一下 slug,去掉多余字符。
* Hexo 博客中的页面(即 layout 为 page)的 `page.path` 会带上一个 `index.html`,搞不懂为什么。
*/
String.prototype.cleanSlug = function () {
var search = '/index.html';
if (this.indexOf(search) === -1) {
return this.slice(0, -1)
} else {
@prinsss
prinsss / lib.js
Created June 11, 2017 14:16
依赖于 jQuery 的纯前端生成文章目录(Table of Contents)。本来是为了辣鸡 Ghost 博客写的,可惜我现在要投奔 Hexo 了 ( ̄3 ̄)
/**
* 差不多就是把一些项目中的现有代码黏在一起,能用而已。目前实现的功能有:
*
* - 生成 TOC(废话)
* - 滚动监听(高亮当前项目)
* - 点击跳转
*/
// https://github.com/ghiculescu/jekyll-table-of-contents
(function($){