3 比 2 要慢不少, 囧rz.
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
#!/bin/bash | |
# Searches for CapCut video editor (https://capcut.com) offline installer files. | |
# If links not available, use https://web.archive.org to download executable. | |
for va in {4..5}; do | |
for vb in {1..20}; do | |
for vc in {0..20}; do | |
for build in {1647..3000}; do | |
for extension in dmg exe; do |
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 subprocess | |
html = '<p><strong>Hello</strong> <em>Bob</em> <code>How</code> are you!</p>' | |
p_hex = subprocess.Popen( | |
('hexdump', '-ve', '1/1 "%.2x"'), | |
stdin=subprocess.PIPE, | |
stdout=subprocess.PIPE | |
) | |
p_hex_output = p_hex.communicate(html.encode('utf-8'))[0] |
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
#!/bin/bash | |
# Run cputhrottle for a list of applications in order to limit their CPU usage. | |
# This script needs `pidof` and `cputhrottle` installed, which can be installed from homebrew. | |
# NOTE: This script was tested on MacOS only. | |
if [[ $EUID > 0 ]]; then | |
echo "Please run this script as root/sudo" | |
exit 1 | |
fi |