Skip to content

Instantly share code, notes, and snippets.

@azanium
azanium / ffmpegExplained.sh
Created March 11, 2023 14:48
FFMPEG Explained
ffmpeg -re \
# -re (input)
# Read input at native frame rate. Mainly used to simulate a grab device, or live input stream (e.g. when reading from a file). Should not be used with actual grab devices or live input streams (where it can cause packet loss). By default ffmpeg attempts to read the input(s) as fast as possible. This option will slow down the reading of the input(s) to the native frame rate of the input(s). It is useful for real-time output (e.g. live streaming).
# (!) Turns out this will interrupt the stream by the audio input, making the output stream fps looks extremely low
-pix_fmt uyuv442 \
-framerate 30 \
-f avfoundation \
# Pixel format & Framerate for FFMPEG-device: https://www.ffmpeg.org/ffmpeg-devices.html#avfoundation
-i "0" \
# Use input "0" from avfoundation
@azanium
azanium / docker-compose.redis.yml
Last active February 2, 2023 13:07
docker-compose.redis.yml
version: '3'
services:
cache:
image: redis:6.2-alpine
restart: always
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
volumes:
- cache:/data
@azanium
azanium / docker-compose.mysql.yml
Last active February 2, 2023 13:07
docker-compose.mysql.yml
version: '3'
services:
db:
image: mysql:8.0
cap_add:
- SYS_NICE
restart: always
environment:
- MYSQL_DATABASE=db
- MYSQL_ROOT_PASSWORD=password
@azanium
azanium / docker-compose-etcd.yml
Created February 2, 2023 13:03
docker-compose-etcd.yml
---
# Copyright 2018 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@azanium
azanium / Activate Office 2019 for macOS VoL.md
Created October 23, 2019 02:56 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@azanium
azanium / master.cnf
Created September 5, 2019 01:13
MySQL Replication Config
[mysqld]
bind-address = 192.168.56.9
server_id = 1
log_bin = /var/log/mysql/mysql-bin.log
log_bin_index = /var/log/mysql/mysql-bin.log.index
binlog_ignore_db = "mysql"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.10000000149011612</real>
@azanium
azanium / ainasoft.com
Created January 13, 2019 13:27
Nginx Reverse Proxy
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@azanium
azanium / gist:b6a1aecc87f4505f956db3e2db1dd3d0
Created December 19, 2018 11:54 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@azanium
azanium / .vimrc
Created November 2, 2018 01:53
Vim Config
" be iMproved, it's 21st Century ;-)
"
set nocompatible
" no need filetype to load plugins
filetype off
" specify a directory for plugins
"
" - Avoid using standard Vim directory names like 'plugin'