This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import socket | |
import httplib | |
import ssl | |
import urllib | |
import urllib2 | |
# archaic python urllib2 documentation: 2.7.2 | |
# https://python.readthedocs.io/en/v2.7.2/library/urllib2.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# vim: set ts=4 sts=4 et fileencoding=utf-8: | |
import itertools | |
target = 110 | |
ops = [' + ', ' - ', ''] | |
digit_list = list('123456789') | |
for op_list in itertools.product(ops, repeat=8): | |
expr = ''.join([ item for pair in zip(digit_list, op_list + ('',)) for item in pair ]) | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
战神系列发售时间表: | |
2005 PS2 《战神1》 | |
2007 PS2 《战神2》 | |
2007 java手游 《战神:背叛》 | |
2009/2014 PS3/PSV 《战神1+2收藏版》 | |
2008 PSP 《战神:奥林匹斯之链》 | |
2010 PS3 《战神3》 | |
2010 PSP 《战神:斯巴达之魂》 | |
2011 PS3 《战神起源携带版合集》(收录了奥林匹斯之链+斯巴达之魂) | |
2012 PS3 《战神传说版》(收录了战神1、2、3+奥林匹斯之链+斯巴达之魂) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# vim: set fileencoding=utf-8: | |
# Code shamelessly copied from: | |
# http://stackoverflow.com/questions/12479570/given-a-torrent-file-how-do-i-generate-a-magnet-link-in-python | |
# How to install the `bencode' module for Python on Windows: | |
# Run a command line window as Administrator: | |
# % python -m pip install bencode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pacman -S transmission-cli | |
cd /var/lib/transmission/.config/transmission-daemon/ | |
cp settings.json edit.txt | |
(EDIT edit.txt) | |
cat edit.txt >settings.json | |
cd /usr/share/transmission | |
git clone -o github 'https://github.com/ronggang/transmission-web-control.git' | |
cd /usr/share/transmission/web | |
mv index.html index.original.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Managed Desktop download | |
vs_professional.exe --layout "%~dp0vs2017_layout_MD" ^ | |
--add Microsoft.VisualStudio.Workload.ManagedDesktop ^ | |
--lang en-US | |
:: Native Desktop download | |
vs_professional.exe --layout "%~dp0vs2017_layout_ND" ^ | |
--add Microsoft.VisualStudio.Workload.NativeDesktop ^ | |
--lang en-US |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for f in *.mkv; do | |
echo -n "$f" | |
checksum=$( echo "$f" | sed -e "s/^.*\[\([^][]\+\)\]\.mkv/\1/" ) | |
#echo " Checksum: $checksum" | |
checksum_calc=$( cksfv "$f" | awk '/^[^;]/ { print $2; }' ) | |
if [ "$checksum" == "$checksum_calc" ]; then | |
echo " - GOOD" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM echo.ARG1: Video Directory, e.g., \\alarm\media\xiayitiao\download\Game.Of.Thrones.S01\ | |
REM echo.ARG2: Season selection, e.g., S01 | |
REM echo.ARG3: Subtitle directory, e.g., subs-1 | |
REM echo.ARG4: Subtitle naming tag, e.g., zh-1 | |
for %%i in (2 3) do ( | |
call subrename.bat ^ | |
"\\alarm\media\xiayitiao\download\HBO史诗巨著:冰与火之歌.权力的游戏.第六季全.2016.中英字幕£CMCT梦幻" ^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.34-1-pve] (local build) | |
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org | |
=== START OF INFORMATION SECTION === | |
Model Family: Seagate Desktop HDD.15 | |
Device Model: ST5000DM000-1FK178 | |
Serial Number: W4J0BAVZ | |
LU WWN Device Id: 5 000c50 07d53b6c5 | |
Firmware Version: CC46 | |
User Capacity: 5,000,981,078,016 bytes [5.00 TB] |