Skip to content

Instantly share code, notes, and snippets.

View afriza's full-sized avatar

Afriza N. Arief afriza

  • Indonesia
  • 10:44 (UTC +07:00)
View GitHub Profile
@afriza
afriza / INSTALLING-vlc-with-decklink-support.md
Last active January 28, 2021 03:56
Compiling and installing `vlc` with Decklink SDK on Ubuntu 18.04 Server
@afriza
afriza / ssh-without-host-key-check.config
Created October 1, 2019 05:50
SSH config to disable strict host key checking
Host localhost 127.0.0.1
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
@afriza
afriza / building-obs-studio-on-mac.md
Last active May 16, 2020 15:30
Building OBS Studio on macOS

Building OBS Studio under macOS

  • Install brew
  • Install
    brew install ffmpeg x264 qt5 cmake mbedtls
    git clone --recursive https://github.com/obsproject/obs-studio.git
    cd obs-studio
    mkdir build
    cd build
    

export CMAKE_PREFIX_PATH=/usr/local/opt/qt

@afriza
afriza / HOWTO.md
Created April 13, 2020 04:14 — forked from ivanvermeyen/HOWTO.md
Multiple MySQL versions on MacOS with Homebrew

Multiple MySQL versions on MacOS with Homebrew

At the time of writing (december 2018), there aren’t any up-to-date and easy to apply guides on how to switch between different MySQL version on a Mac using Homebrew . Or at least, I didn’t find any.

So I picked up a few things here and there and finally managed to connect all the pieces of the puzzle. I hope this guide can help you and the future me. If anyone knows of a better way to accomplish this, I do hope they will share their insight :)

The basic idea here is that you need to install all MySQL versions one at a time and assign each its own data directory.

I am using Homebrew 1.8.5. (brew -v)

@afriza
afriza / 2020-05-04 10-14-30.txt
Last active May 7, 2020 02:12
OBS Studio log on Ubuntu Linux 18.04 BMD Device has missing audio after 3 days. [forum post](https://obsproject.com/forum/threads/blackmagic-device-metering-is-good-but-no-audio-in-stream.72193/#post-455971)
10:14:30.816: CPU Name: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
10:14:30.816: CPU Speed: 4401.187MHz
10:14:30.817: Physical Cores: 4, Logical Cores: 8
10:14:30.817: Physical Memory: 7847MB Total, 2158MB Free
10:14:30.817: Kernel Version: Linux 5.3.0-51-generic
10:14:30.817: Distribution: "Ubuntu" "18.04"
10:14:30.817: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.20.5
10:14:30.818: Portable mode: false
10:14:30.843: OBS 25.0.8 (linux)
10:14:30.843: ---------------------------------
@afriza
afriza / duration-all.sh
Created April 10, 2022 11:51
Get video duration using ffprobe from ffmpeg suite
#! /bin/sh
DIR=${1:-"."}
find "$DIR" -type f -iname "*.mp4" -print0 | sort -z | xargs -r0 -I{} duration.sh "{}"
@afriza
afriza / ssh-config
Created May 27, 2022 12:56
SSH client config to ignore/disable `StrictHostKeyChecking`
Host localhost 192.168.* 10.*
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
@afriza
afriza / restore-deleted-git-tag.md
Created June 1, 2022 07:55
Restore deleted git tag

Find unreachable tags

git fsck --unreachable | grep tag

Check tag details with

git show KEY
@afriza
afriza / docker-ips-all.sh
Last active June 10, 2022 01:21
List all IPs of all running docker containers
#! /usr/bin/env -S sh
# Reference: https://stackoverflow.com/a/36883565/109747
docker inspect --format='{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}} {{end}}' $(docker ps -aq)
@afriza
afriza / add-rsync-to-git-for-windows.sh
Last active March 13, 2024 15:27
Copies rsync binaries and its dependencies from MSYS2 to Git for Windows
#! /bin/sh -x
# The reason to copy rsync binaries into Git for Windows is because
# VS Code has built in support for Git Bash shell in its Terminal.
# steps:
# 1. install Git for Windows from https://gitforwindows.org/
# 2. install MSYS2 from https://www.msys2.org/
# 3. Run as administrator: MSYS2 MSYS
# 4. execute the commands below in MSYS2 MSYS from step 3