首先猫会介绍一下最近都有神马激动人心的新坑出现了~
Firefox 要增加针对数字内容版权的 drm 支持啦...
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import os | |
| import sys | |
| ''' | |
| Clone of WWStar, an ancient Classical Chinese translator. | |
| usage: python3 WWStarClone.py [dir] |
| # INCORRECT! DON'T DO THIS! | |
| >>> x = "www.alliancefrançaise.nu" # This is the problematic line. Forgot to make this a Unicode string. | |
| >>> print x | |
| www.alliancefrançaise.nu | |
| >>> x.encode('punycode') | |
| 'www.Alliancefranaise.nu-h1a31e' | |
| >>> x.encode('punycode').decode('punycode') | |
| u'www.Alliancefran\xc3\xa7aise.nu' | |
| >>> print x.encode('punycode').decode('punycode') | |
| www.alliancefrançaise.nu |
| CUTTER = python3 jumpcutter/jumpcutter.py | |
| %_0.3.mp4: %.mkv | |
| ffmpeg -i $< -c:v copy $(basename $<).mp4 | |
| if [ -d ./TEMP ]; then rm -r ./TEMP; fi | |
| ${CUTTER} --silent_threshold 0.3 --input_file $(basename $<).mp4 --output_file $(basename $<)_0.3.mp4 | |
| %_wechat.mp4: %_0.3.mp4 | |
| ffmpeg -i $< -c copy -t 00:05:00.00 $@ | |
| %_0.1.mp4 %_0.2.mp4 %_0.3.mp4: %.mp4 | |
| if [ -d ./TEMP ]; then rm -r ./TEMP; fi |
| #!/usr/bin/env python3 | |
| import asyncio | |
| import multiprocessing | |
| import os | |
| import ssl | |
| from time import sleep | |
| port = 9000 |
| #! /usr/bin/python | |
| # Usage `python list-url.py` | |
| import frida,sys | |
| jspayload= """ | |
| setImmediate(function() { |
| # My ISP-provided fiber optical modem broadcasts a line of a poem every ten seconds. Here's the tcpdump of the complete poem. | |
| # The optical modem is made by Shanghai Nokia-Bell Co.,Ltd and its model number is G-140W-UD. It's provided by my ISP, China Unicom in Shenzhen. | |
| $ tcpdump -i vlan10 ether proto 0x8300 | |
| 15:59:00.720301 00:00:00:00:00:12 (oui Ethernet) > Broadcast, ethertype Unknown (0x8300), length 72: | |
| 0x0000: 0000 0000 e4ea 8386 d93c 5468 6520 6461 .........<The.da | |
| 0x0010: 7920 4920 6c6f 7374 206d 7920 7665 7279 y.I.lost.my.very | |
| 0x0020: 2066 6972 7374 2074 6f6f 7468 2c00 0000 .first.tooth,... | |
| 0x0030: 0000 0000 0000 0000 0000 .......... | |
| 15:59:10.740778 00:00:00:00:00:12 (oui Ethernet) > Broadcast, ethertype Unknown (0x8300), length 72: |
| #!/usr/bin/python | |
| """ | |
| Usage: python csv2wikitable.py csv_file | |
| ----- | |
| input: csv format | |
| output: wiki table format | |
| """ |
For some extra awesomeness replace a javascript file with a js file from dropbox with ?dl=1 at the end of the js url. Now you can modify the file locally, it will update itself, and you just have to refresh the browser. Pretty cool!
| from typing import Any, Dict, List, Mapping, Union | |
| # Values for JSON that aren't nested | |
| JSON_v = Union[str, int, float, bool, None] | |
| # If MyPy ever permits recursive definitions, just uncomment this: | |
| # JSON = Union[List['JSON'], Mapping[str, 'JSON'], JSON_v] | |
| # Until then, here's a multi-layer way to represent any (reasonable) JSON we | |
| # might send or receive. It terminates at JSON_4, so the maximum depth of |