Skip to content

Instantly share code, notes, and snippets.

@fieri
fieri / denoise.sh
Created March 27, 2022 00:47 — forked from alecjacobson/denoise.sh
Remove background audio noise from a video clip via the command line (using ffmpeg and sox)
#!/bin/bash
if [ -z "$2" ];then
echo 'USAGE:
denoise input.mov output.mov
OR
denoise input.mov output.mov [ambient-noise-start-time] [ambient-noise-duration] [sox-noisered-amount] [sox-norm-param]
@fieri
fieri / tamper-xpath.js
Created February 27, 2022 18:12 — forked from ZoolWay/tamper-xpath.js
Tampermonkey, XPath parser function for javascript console
// ==UserScript==
// @name ricky_xpath
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*/*
// @match http://*/*
// @grant none
// ==/UserScript==
@fieri
fieri / README.md
Created November 14, 2021 16:01 — forked from maboloshi/README.md
[Mac下配置Aria2] #macOS #aria2

Mac下配置Aria2

安装和设置 Aria2

# 使用 Homebrew 安装 aria2
brew install aria2

# 创建配置文件aria2.conf和空对话文件aria2.session
mkdir ~/.aria2 && cd ~/.aria2
touch aria2.conf
@fieri
fieri / proxy_for_terminal.md
Created November 3, 2021 08:52 — forked from fearblackcat/proxy_for_terminal.md
Set proxy for terminal on mac

Shadowsocks Proxy

apt-get install python-pip
pip install shadowsocks

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
@fieri
fieri / ffmpeg.md
Created October 17, 2021 14:00 — forked from protrolium/ffmpeg.md
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@fieri
fieri / ffmpeg_frames.sh
Created May 28, 2021 23:06 — forked from loretoparisi/ffmpeg_frames.sh
Extract all frames from a movie using ffmpeg
# Output a single frame from the video into an image file:
ffmpeg -i input.mov -ss 00:00:14.435 -vframes 1 out.png
# Output one image every second, named out1.png, out2.png, out3.png, etc.
# The %01d dictates that the ordinal number of each output image will be formatted using 1 digits.
ffmpeg -i input.mov -vf fps=1 out%d.png
# Output one image every minute, named out001.jpg, out002.jpg, out003.jpg, etc.
# The %02d dictates that the ordinal number of each output image will be formatted using 2 digits.
ffmpeg -i input.mov -vf fps=1/60 out%02d.jpg
@fieri
fieri / total command Git 设置
Created April 24, 2021 08:00 — forked from zfkingth/total command Git 设置
在Windows下利用total command快捷键快速调用git bash进入工作目录。
虽然windows下有TortoiseGit工具,可以通过鼠标实现git操作,但是使用TortoiseGit久了后,
会发现用鼠标点来点去,效率着实不高,有时候一个命令要在菜单里找几秒中,还有就是各文件
的状态图标的刷新,比直接使用git status慢很多,故产生了使用命令行的想法。
但是每次使用Git Bash,需要进入到相应目录(在bash中键入目录绝对路径),而如果直接在cmd
下使用git命令,又没有命令补全的功能,研究发现使用Total Commander快捷键可以很好的解决
这个问题。
最终实现的功能为,在total commander中,进入任意一个git 工作目录(子目录也可以),按下
快捷键Ctrl+~(tab上排的第一个键) ,就会打开Git Bash,而且工作目录也设置好了。
设置如下,在total commander的依次点击 "设置"->"选项"->"其他",在弹出的面板右侧,
“快捷键”中选择Ctrl和OEM_US`~按键,然后点击 “命令”右侧的搜索图标,在弹出的窗体中选择
@fieri
fieri / merge-mp4.sh
Created February 7, 2021 02:24 — forked from bdurrow/merge-mp4.sh
Bash script to merge all mp4 videos in current directory (recursively 2 levels). It also updates the chapter marks to retain the folder/filename of source dir
#!/bin/bash
#http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'
## Script to merge all mp4 videos in current directory (recursively 2 levels)
## And update chapter marks to retain the folder/filename
## Script for merging videos
@fieri
fieri / merge-mp4.sh
Created February 7, 2021 02:07 — forked from palaniraja/merge-mp4.sh
Bash script to merge all mp4 videos in current directory (recursively 2 levels). It also updates the chapter marks to retain the folder/filename of source dir
#!/bin/bash
## Script to merge all mp4 videos in current directory (recursively 2 levels)
## And update chapter marks to retain the folder/filename
## Script for merging videos
filename=`basename pwd`
current=`pwd`
@fieri
fieri / clean-up-arch-linux.md
Created December 25, 2020 13:27 — forked from rumansaleem/clean-up-arch-linux.md
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks