This file contains hidden or 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
| # /etc/udev/rules.d/60-scheduler.rules | |
| # | |
| # set none scheduler for non-rotating disks | |
| ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="none" | |
| # set bfq scheduler for rotating disks | |
| ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq" |
This file contains hidden or 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
| import urllib2 | |
| import json | |
| import time | |
| # Form: http://digitalpbk.com/stock/google-finance-get-stock-quote-realtime | |
| class GoogleFinanceAPI: | |
| def __init__(self): | |
| self.prefix = "http://finance.google.com/finance/info?client=ig&q=" | |
| def get(self,symbol,exchange): |
This file contains hidden or 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
| <?xml version="1.0"?> | |
| <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
| <fontconfig> | |
| <match target="pattern"> | |
| <test name="lang" compare="contains"> | |
| <string>zh-CN</string> | |
| </test> | |
| <test name="family"> | |
| <string>sans-serif</string> | |
| </test> |
This file contains hidden or 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
| convert SRT to ASS subtitle format: | |
| ffmpeg -i input.srt input.ass | |
| ffmpeg -i input.mp4 -i input.ass -c:v copy -c:a copy -c:s copy -map 0:0 -map 0:1 -map 1:0 -y out.mkv | |
| or | |
| ffmpeg -i infile.mp4 -f srt -i infile.srt -c:v copy -c:a copy -c:s mov_text outfile.mp4 |