Skip to content

Instantly share code, notes, and snippets.

View afriza's full-sized avatar

Afriza N. Arief afriza

  • Indonesia
  • 13:55 (UTC +07:00)
View GitHub Profile
@afriza
afriza / sqlite_cpp-cli.cpp
Created May 13, 2011 04:01
SQLite ADO.NET Provider with C++/CLI
// sqlite_cpp-cli.cpp
// Demonstrate SQLite ADO.NET Provider with C++/CLI
#include "stdafx.h"
#using "System.Data.SQLite.dll" // put this file in the project directory
using namespace System;
using namespace System::Data::SQLite;
int main(array<System::String ^> ^args)
@afriza
afriza / jgit.cmd
Created June 11, 2011 08:07
Batch file wrapper to call JGit.Pgm JAR in Microsoft Windows
@REM Author: Afriza N. Arief <afriza.na@gmail.com>
@REM ### automatically search for common JRE/JDK folder path ###
@echo off
set JAVA_CMD=
set JGIT_JAR=
set JGIT_EXT=.JAR;.SH
set JGIT_FILE_PATTERN=*jgit.pgm*
if not defined JAVA_HOME for /d %%d in ("C:\Program Files\Java\jre*") do set JAVA_HOME="%%d"
@afriza
afriza / .clang_complete
Created March 22, 2012 11:13
.clang_complete for kernel module development
-std=gnu89
-I/lib/modules/3.0.0-16-generic/build/include/
-I/lib/modules/3.0.0-16-generic/build/arch/x86/include/
-D__KERNEL__
-DMODULE
@afriza
afriza / HTTPS-LetsEncrypt-nginx.md
Created April 11, 2019 03:48
Installing HTTPS for NGINX with Let's Encrypt on Ubuntu 18.04

Installing HTTPS for NGINX with Let's Encrypt on Ubuntu 18.04

  • First, install add-apt-repository
    sudo apt install software-properties-common
  • Then, install certbot
    sudo add-apt-repository ppa:certbot/certbot
    sudo apt install python-certbot-nginx
@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 / 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 / twinkle-auto-call-answer.go
Last active April 22, 2020 17:43
Twinkle Linux SIP/VoIP auto call and auto answer via command line
package main
import (
"bufio"
"context"
"flag"
"fmt"
"log"
"os/exec"
"strings"
@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 / 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 / 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