Skip to content

Instantly share code, notes, and snippets.

View kxfeng's full-sized avatar

kxfeng

  • China
View GitHub Profile
@kxfeng
kxfeng / apple_compatible_video_converter.py
Created November 1, 2024 13:04
Convert videos to Apple compatible videos, to fix photo sync error between Apple devices: "Some videos were not copied to the iPhone because they cannot be played on this iPhone."
import os
import subprocess
import shutil
def convert_videos(input_dir, output_dir):
# Ensure the output directory exists
os.makedirs(output_dir, exist_ok=True)
# Get all mp4 files
mp4_files = [f for f in os.listdir(input_dir) if f.endswith('.mp4')]
<code_scheme name="Android" version="173">
<option name="RIGHT_MARGIN" value="100" />
<AndroidXmlCodeStyleSettings>
<option name="USE_CUSTOM_SETTINGS" value="true" />
<option name="LAYOUT_SETTINGS">
<value>
<option name="INSERT_LINE_BREAK_BEFORE_NAMESPACE_DECLARATION" value="true" />
</value>
</option>
</AndroidXmlCodeStyleSettings>
@kxfeng
kxfeng / install_bbr_on_ubuntu.sh
Last active March 25, 2023 11:12
install bbr on ubuntu
# download linux kenel
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/<version>/linux-headers-<version>_all.deb
wgte http://kernel.ubuntu.com/~kernel-ppa/mainline/<version>/linux-headers-<version>-generic_<version>_arm64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/<version>/linux-image-<version>-generic_<version>_amd64.deb
# intsall linux kenel
sudo dpkg -i *.deb
# unintsall old kenel
dpkg -l|grep linux-image