Skip to content

Instantly share code, notes, and snippets.

🐟
摸鱼中

prin printempw

🐟
摸鱼中
View GitHub Profile
@printempw
printempw / typora-md.reg
Created Apr 23, 2020
修复便携版 VS Code、Typora 的文件类型关联
View typora-md.reg
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"
View c_cpp_properties.json
{
"configurations": [
{
"name": "MinGW G++",
"intelliSenseMode": "gcc-x64",
"compilerPath": "C:\\Portable\\mingw64\\bin\\g++.exe",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
@printempw
printempw / convert-gmail-quote-attribution-to-english.user.js
Last active May 15, 2020
[User Script] Convert Gmail Quote Attribution to English
View convert-gmail-quote-attribution-to-english.user.js
// ==UserScript==
// @name Convert Gmail Quote Attribution to English
// @namespace http://tampermonkey.net/
// @version 0.1.3
// @description Convert Gmail's attribution line for automatically quoted messages to format in English.
// @author printempw
// @license MIT
// @match *://mail.google.com/*
// @match *://gmail.com/*
// @run-at context-menu
@printempw
printempw / check_youtube.py
Created Jul 4, 2019
Check whether YouTube channel is live streaming.
View check_youtube.py
#!/usr/bin/env python3
# coding: utf-8
import re
import sys
import json
import requests
from retrying import retry
headers = {
@printempw
printempw / bash-centos.zsh-theme
Last active Apr 19, 2020
My custom Zsh themes.
View bash-centos.zsh-theme
# 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%} "
@printempw
printempw / .travis.yml
Last active Nov 8, 2018
Travis CI config for Hexo blog automatic deployment.
View .travis.yml
language: node_js
node_js: stable
# 只监听 source 分支的改动
branches:
only:
- source
# 缓存依赖,节省持续集成时间
cache:
@printempw
printempw / example.js
Created Jun 25, 2017
Hexo 访问计数器,前端示例脚本。
View example.js
/**
* 这里处理一下 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 {
@printempw
printempw / lib.js
Created Jun 11, 2017
依赖于 jQuery 的纯前端生成文章目录(Table of Contents)。本来是为了辣鸡 Ghost 博客写的,可惜我现在要投奔 Hexo 了 ( ̄3 ̄)
View lib.js
/**
* 差不多就是把一些项目中的现有代码黏在一起,能用而已。目前实现的功能有:
*
* - 生成 TOC(废话)
* - 滚动监听(高亮当前项目)
* - 点击跳转
*/
// https://github.com/ghiculescu/jekyll-table-of-contents
(function($){
@printempw
printempw / printempw.pub
Last active Jan 16, 2020
我的 PGP 公钥:B51137BF34A36F0652241A816FC03E5D3F409A40
View printempw.pub
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBFkgK7UBCADiDZCI37cTPEGW9hHP0AcsVItwozCjjd2bGdNoxOdINiQKHuaX
ILDipjwM1MgaLDculcbzH/LekviL8IKqwJbqWsNJfG6OW2WPUvn+UbCOdBzp2+Be
QO4vNFEaZGINeZ5cQuXU/+Z8kV0TauIqc3ngGxF4F/Kp1PNLtX8j5+LoV68pcTUt
ojmHXDc2gfFtH/bxAcZtpXyU2KgKGJab6ojOc/EE72qUe/+T/fiEhqQ+vUPdUgMe
Zl3CCi2+h9pe75lm2mlNi+jQjG/mS499bCgfFfZUAICniO0KKja++Wox4v/uDCyz
B/FRg5uuZJaliaWD8EF6AS5IP0NLpXJkqkDnABEBAAG0JjYyMXNhbWEgKHByaW50
ZW1wdykgPGhAcHJpbnpldWdlbi5uZXQ+iQE2BBMBCgAgBQJZICu1AhsDBQsJCAcD
@printempw
printempw / concat.sh
Last active May 18, 2020
使用 ffmpeg 拼接 Bilibili 客户端所下载的分段 flv 视频,https://blessing.studio/use-ffmpeg-to-concat-flv-videos-downloaded-by-bilibili-client/
View concat.sh
# @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;
You can’t perform that action at this time.