Skip to content

Instantly share code, notes, and snippets.

:shipit:
What's happening?

Allan Lei allanlei

:shipit:
What's happening?
Block or report user

Report or block allanlei

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@allanlei
allanlei / ffmpeg-blurout.sh
Last active Sep 7, 2019
FFmpeg Filtergraph to generate Blur Out
View ffmpeg-blurout.sh
ffmpeg -i source.mp4 -filter_complex \
"[0:v]split=2[base][blurred]; \
[blurred]boxblur=luma_radius=50:chroma_radius=25:luma_power=1[blurred]; \
[blurred]fade=type=in:start_time=5:duration=1:alpha=1[blurred-with-fadein]; \
[base][blurred-with-fadein]overlay[blurout]" \
-map "[blurout]" blurout.mp4
@allanlei
allanlei / filter-complex-fadein.sh
Last active Sep 7, 2019
FFmpeg Filtergraph to fade in a video
View filter-complex-fadein.sh
ffmpeg -i source.mp4 -filter_complex \
"[0:v]fade=type=in:start_time=1:duration=8[fadein]" \
-map "[fadein]" fadein.mp4
@allanlei
allanlei / filter-complex-blur.sh
Last active Sep 7, 2019
FFmpeg Filtergraph to blur a video
View filter-complex-blur.sh
ffmpeg -i source.mp4 -filter_complex \
"[0:v]boxblur=luma_radius=10:chroma_radius=10:luma_power=1[blurred]" \
-map "[blurred]" blurred.mp4
@allanlei
allanlei / filter-complex-split.sh
Created Sep 7, 2019
FFmpeg Filtergraph to split inputs (with scaling)
View filter-complex-split.sh
ffmpeg -i source.mp4 -filter_complex \
"[0:v]split=2[360p][720p]; \
[360p]scale=-2:360[360p]; \
[720p]scale=-2:720[720p]" \
-map "[360p]" 360p.mp4 \
-map "[720p]" 720p.mp4
@allanlei
allanlei / xfs-detector.yaml
Created Sep 16, 2018
Kubernetes XFS support detector
View xfs-detector.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
namespace: kube-system
name: xfs-detector
labels:
app: xfs-detector
spec:
selector:
matchLabels:
@allanlei
allanlei / kernel-tuner.yaml
Created Sep 15, 2018
Kubernetes THP tuner daemonset
View kernel-tuner.yaml
kind: DaemonSet
apiVersion: apps/v1
metadata:
namespace: kube-system
name: kernel-tuner
labels:
app: kernel-tuner
spec:
selector:
matchLabels:
@allanlei
allanlei / rbac.yaml
Created Sep 15, 2018
Kubernetes Node Labeling permissions
View rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: node-labeler
rules:
- apiGroups: [""]
resources: ["node"]
verbs: ["list", "update"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
@allanlei
allanlei / redis.yaml
Created Sep 15, 2018
Kubernetes System THP nodeAffinity
View redis.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
@allanlei
allanlei / daemonset.yaml
Last active Sep 2, 2019
Kubernetes sysctl daemonset for tuning Transparent Huge Pages
View daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
namespace: kube-system
name: sysctl
spec:
selector:
matchLabels:
app: sysctl
template:
@allanlei
allanlei / deployment.yaml
Created Jan 28, 2018
Install kubectl into a Kubernetes Pod
View deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
You can’t perform that action at this time.