Skip to content

Instantly share code, notes, and snippets.

@mailinglists35
mailinglists35 / miui_adb_install.sh
Last active November 20, 2022 22:45 — forked from zpp0196/miui_adb_install.sh
MIUI 「USB安装」免登录账号
#!/bin/sh
set -e
setprop persist.security.adbinput 1
setprop persist.security.adbinstall 1
provider_prefs_xml=/data/data/com.miui.securitycenter/shared_prefs/remote_provider_preferences.xml
provider_prefs_tmp_xml=/data/local/tmp/remote_provider_preferences.xml
sed -e "/security_adb_install_enable/d;/permcenter_install_intercept_enabled/d" $provider_prefs_xml > $provider_prefs_tmp_xml
@mailinglists35
mailinglists35 / pci-passthrough.md
Created April 3, 2021 22:06 — forked from ulkeshkosh/pci-passthrough.md
PCI-Passthrough Rig, OS, and Setup

Introduction

This is my guide for a successful PCI-Passthrough from Linux (Arch Linux) to QEMU/KVM via virt-manager and libvirtd into a Windows 10 Home guest.

NOTE: This is a guide for Intel only. I do not own an AMD machine, and will not add AMD information this guide until such time that I do, which could be never.

Hardware

Device Type Device
CPU Intel Core i7 7700K Quad-Core, Hyperthreading
Motherboard Gigabyte Z270X-Gaming 5
@mailinglists35
mailinglists35 / ping@.service
Last active October 10, 2018 17:06 — forked from mosquito/pingd.service
Systemd ping daemon
[root@stage ~]# cat /etc/systemd/system/ping@.service
[Unit]
Description=One time ping check of host %I
After=network.target
[Service]
Type=forking #forking makes the unit stay in starting state until ping finishes. oneshot does not work with RemainAfterExit, while type simple makes the unit started as soon as ping starts, which is something we DON'T want
Restart=on-failure
ExecStart=/bin/ping -q -c 5 %i
RemainAfterExit=true
@mailinglists35
mailinglists35 / switch-hyper-threading
Created September 25, 2018 15:10 — forked from zuyu/switch-hyper-threading
Switch on / off hyper threading.
#!/bin/bash
typeset -i core_id
typeset -i sibling_id
typeset -i state
for i in /sys/devices/system/cpu/cpu[0-9]*; do
core_id="${i##*cpu}"
sibling_id="-1"
if [ -f ${i}/topology/thread_siblings_list ]; then
@mailinglists35
mailinglists35 / ffmpeg gps
Last active January 5, 2018 11:23 — forked from oeon/HowToStripAndFlip.md
How to remove GPS EXIF from iPhone .mov video
*say that you left your Location turned on and held your phone upside down. If you want to fix that, try this:*
strip: `ffmpeg -i input.mov -map_metadata -1 -vcodec copy -acodec copy output.mov` via http://askubuntu.com/questions/139570/how-do-i-remove-all-metadata-from-a-quicktime-movie-file (read comments)
flip: `ffmpeg -i in.mov -vf "vflip" out.mov` via http://superuser.com/questions/578321/how-to-flip-a-video-180-vertical-upside-down-with-ffmpeg (then to ffmpeg documentation)