View ffmpeg_cmd.sh
This file contains 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
# Source: https://stackoverflow.com/a/59307017 | |
# Merge two audio track into one | |
ffmpeg -i originalfile.mov -c:v copy -c:a aac -b:a 160k -ac 2 -filter_complex amerge=inputs=2 output.mp4 | |
# Source: https://stackoverflow.com/a/36120894 | |
# Get last x second | |
ffmpeg -sseof -10 -i input.mp4 output.mp4 | |
# Source: https://superuser.com/a/933310 | |
# Reduce file size |
View my_cfg.cfg
This file contains 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
bind mwheelup +jump | |
bind mwheeldown +jump | |
alias "+jumpthrow" "+jump;-attack"; | |
alias "-jumpthrow" "-jump"; | |
bind alt "+jumpthrow" | |
alias "+score_net_graph" "+showscores; net_graphheight 0"; | |
alias "-score_net_graph" "-showscores; net_graphheight 10000"; | |
bind tab "+score_net_graph" |
View no_ctrl_s_grammarly.js
This file contains 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
// ==UserScript== | |
// @name Ignore Ctrl/Cmd-S on Grammarly | |
// @namespace https://wangjieke.github.io/ | |
// @version 0.1 | |
// @description Ignore Ctrl/Cmd-S on Grammarly | |
// @author WANGJIEKE | |
// @match https://app.grammarly.com/ddocs/* | |
// @grant none | |
// ==/UserScript== |
View mkv2mp4.py
This file contains 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
#!/usr/bin/env python3 | |
""" | |
mkv2mp4.py | |
This script needs MKVToolNix and FFmpeg to run | |
""" | |
USAGE = 'usage: mkv2mp4.py INPUT' | |
from pathlib import Path |
View csv2xlsx.ps1
This file contains 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
$excel = New-Object -ComObject Excel.Application | |
$excel.Visible = $false | |
ForEach ($dir in $args) { | |
Write-Output "Converting all csv to xlsx inside $(Resolve-Path $dir)..." | |
Get-ChildItem -Path $(Resolve-Path $dir) | ForEach { | |
if ($_.Extension -ne ".csv") { | |
continue | |
} |
View flv2mp4.sh
This file contains 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
for i in *.flv; | |
do ffmpeg -i "$i" -c copy "${i%.*}.mp4"; | |
done |
View disable_device_credential_guard.ps1
This file contains 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
bcdedit /set hypervisorlaunchtype off |
View gbk2utf8.py
This file contains 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
#!/usr/bin/env python3 | |
from typing import Optional | |
import os | |
import fire | |
def gbk2utf8(path: str, out: Optional[str]='utf8_out.txt') -> None: | |
"""Convert file encoded in GBK into UTF-8 |
View config-highlight.cfg
This file contains 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
[Darcula] | |
normal-foreground = #A9B7C6 | |
normal-background = #2B2B2B | |
definition-foreground = #A9B7C6 | |
definition-background = #2B2B2B | |
keyword-foreground = #CC7832 | |
keyword-background = #2B2B2B | |
builtin-foreground = #8888C6 | |
builtin-background = #2B2B2B | |
string-foreground = #507842 |