Skip to content

Instantly share code, notes, and snippets.

View JerryFleming's full-sized avatar

Jerry Fleming JerryFleming

View GitHub Profile
@JerryFleming
JerryFleming / ffmpeg-watermark.md
Created December 8, 2020 15:24 — forked from bennylope/ffmpeg-watermark.md
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.

vasectomy -> sterilization -> vas deferents
cue = signal script
owe = obligated
pickup => van, truck
altercation = quarrel
persona
epic: a long poem; long and arduous
quiche: a baked flan or tart
agility -> agile
billboard = hoarding
[alias]
b = branch
cat = -p cat-file -p
ci = commit -a
co = checkout
d = diff -C -w
ls = ls-files --exclude-from=.git/info/exclude -v -d -o -m -s -u
lsd = ls-files -d
l = log --stat --graph '--format=%Cblue%h%Creset<%Cblue%an%Creset> %Cgreen%ar%Creset %Cblue%d%Creset %s' --all -15
ll = log --graph '--format=%Cblue%h%Creset<%Cblue%an%Creset> %Cgreen%ar%Creset %Cblue%d%Creset %s' --all --simplify-by-decoration
PS1='\[\033]0;\u@\h: \w\007\]'
if [[ ${EUID} == 0 ]] ; then
PS1=$PS1'\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
else
PS1=$PS1'\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
fi
export HISTTIMEFORMAT='%Y-%m-%d %H:%M:%S '
export HISTSIZE=10000
export HISTIGNORE="&:clear:exit"
set ww=h,l,<,>,[,],b,s " move over new lines
set hls
set showcmd
"set ch=2 " enlarge cmdheight so as to avoid the message "HIT ENTER TO CONTINUE"
colorscheme elflord "murphy
" spacebar in command mode to pagedown
map <Space>
map <BS> X
map <Up> gk
map <Down> gj
@JerryFleming
JerryFleming / proxy.scpt
Last active August 29, 2015 13:57
Set proxy for all apps on Mac, including GUI and terminal, according to wi-fi AP name. Should be used together with proxy.sh <https://gist.github.com/JerryFleming/9825285>.
property my_wifi : "off"
tell application "System Events" to tell menu bar 1 of process "SystemUIServer" of application "System Events"
set wifi_menu to first item of (value of attribute "AXChildren" as list) whose (value of attribute "AXDescription") contains "Wi-Fi"
tell wifi_menu
click
set my_wifi to (name of menu items of menu 1 whose name of attributes contains "AXMenuItemMarkChar" and value of attribute "AXMenuItemMarkChar" is "✓")
click
end tell
end tell
@JerryFleming
JerryFleming / proxy.sh
Created March 28, 2014 04:16
Set up proxy for terminial and GUI apps (cocoa) on Mac. Use '. proxy.sh [none|atl|sgp|corp|china]' to execute.
#!/bin/bash
# Available choices:
# [atl]=web-proxy.atl.hp.com
# [sgp]=web-proxy.sgp.hp.com
# [corp]=web-proxy.corp.hp.com
# [china]=web-proxy.china.hp.com
#
# web-proxy.aus.hp.com port 8080
# proxy.houston.hp.com port 8080
# proxy.austin.hp.com port 8080
@JerryFleming
JerryFleming / 256colors.py
Created March 25, 2014 12:50
Display color blocks for ansi terminals.
#!/usr/bin/python
# coding: utf8
def c(color):
print "\x1b[0m\x1b[38;5;%sm█\x1b[1m█" % color,
print "System colors:"
for color in range(8):
c(color)
print "\x1b[0m"
@JerryFleming
JerryFleming / chapters.py
Created March 25, 2014 12:49
Parse chapters for KingReader.apk
#!/usr/bin/python
# coding: utf-8
import sqlite3 as sqlite
import os.path
import struct
import re
from binascii import hexlify
PIN = re.compile(r'[  ]*[^  ]+(经卷|品)第[一二三四五六七八九十百千万]+($|\(|之)', re.U)
@JerryFleming
JerryFleming / dnspod.py
Last active December 26, 2015 12:08
Update dynamic ip address to point to your domains.
#!/usr/bin/python
# coding: utf8
# vim: ts=4 sts=4 fdm=marker
'''
%s <action> [option]
where action is:
update [force]: update dns.
generate [filter]: generate (filtered) dns record list for update.
'''