Skip to content

Instantly share code, notes, and snippets.

View hiking93's full-sized avatar
😗

Hsingchien Cheng (工程師 Hiking) hiking93

😗
View GitHub Profile
fun View.doOnWindowInsetsChanged(
listenToAnimation: Boolean = false,
@DispatchMode dispatchMode: Int = DISPATCH_MODE_STOP,
callback: (v: View, insets: WindowInsetsCompat) -> WindowInsetsCompat,
) {
var isAnimationRunning = false
ViewCompat.setOnApplyWindowInsetsListener(this) { v, insets ->
if (isAnimationRunning) insets else callback(v, insets)
}
if (listenToAnimation) {
$files = Get-ChildItem -Recurse -Filter '*.ts'
foreach ($file in $files) {
ffmpeg.exe -i ($file) ($file -replace '\.ts$', '.mp4')
}
@hiking93
hiking93 / disable_chrome_remote_desktop_curtain_mode.bat
Created April 27, 2024 09:57
Chrome Remote Desktop Curtain Mode
reg add HKLM\Software\Policies\Google\Chrome /v RemoteAccessHostRequireCurtain /d 0 /t REG_DWORD /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /d 1 /t REG_DWORD /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v SecurityLayer /d 2 /t REG_DWORD /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /d 1 /t REG_DWORD /f
net stop chromoting
net start chromoting