Skip to content

Instantly share code, notes, and snippets.

@tongyifan
tongyifan / u2.py
Last active September 2, 2021 01:54
U2更新种子securekey(qBittorrent)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# 0. 免责:仅在本人的qBittorrent v4.1.8上测试通过,本人不承担任何责任
# 1. 安装依赖: pip3 install requests python-qbittorrent
# 2. 修改代码开头的apikey和qbittorrent_config
# 3. 运行: python3 u2.py
# 4. 等待运行完成
import time
#!/bin/bash
# Author: Aeghn
# Jump between Emacs and i3wm
WM_CLASS_STRING=$(xprop -id $(xdotool getwindowfocus) WM_CLASS)
WM_CLASS_STRING=${WM_CLASS_STRING##* }
emacsclient=~/.local/bin/emacsclient
@rudolfovich
rudolfovich / startup.sh
Last active July 4, 2020 21:55
Startup cron + tmux script
#!/bin/bash
# Cron + tmux statup script
# Approach was taken from http://www.nburles.co.uk/linux/starting-a-process-in-a-tmux-session-using-cron
# Sleep for 5 seconds. If you are starting more than one tmux session
# "at the same time", then make sure they all sleep for different periods
# or you can experience problems
/bin/sleep 5
# Ensure the environment is available
@mlund
mlund / doi2bib.sh
Last active March 25, 2018 23:31
Convert Digital Object Identifier (DOI) to BibTeX using crosscite.org
#!/bin/bash
curl -LH "Accept: application/x-bibtex;q=1" http://dx.doi.org/$1
echo