Skip to content

Instantly share code, notes, and snippets.

Connect Firebase Hosting to Namecheap Custom Domain

SOURCE, SOURCE, SOURCE

  1. Go to Firebase's Dashboard > Develop > Hosting > Connect Domain.
  2. Enter the custom domain that you'd like to connect to your Hosting site.
  3. (Optional) Check the box to redirect of all requests on the custom domain to a second specified domain.
  4. Click Continue to initiate the validation process.
  5. Go to Namecheap's Dashboard > Domain List > Manage > Advanced DNS.
  6. Under Host Records, add a new record with:
@vxhviet
vxhviet / LUTFilter.md
Last active April 5, 2025 15:16
How to Apply Color LUT to bitmap images for filter effects in Android?

Source: StackOverflow, StackOverflow

Question: How to Apply Color LUT to bitmap images for filter effects in Android?

Answer:

    final static int X_DEPTH = 64;
    final static int Y_DEPTH = 64; //One little square in the LUT has 64x64 pixels in it
    final static int ROW_DEPTH = 8;
@vxhviet
vxhviet / simplifiedGitFlow.md
Last active March 2, 2025 11:36
A simplified version of Git Flow

Simplified Git-flow

                        RELEASE TAG
o----------------------------o-----------------o------------o------> MASTER
 \                          /  \                \----------/ HOTFIX
  \                        /    \                          \
   \----------------------/      \--------------------o-----o------> DEVELOP
                                  \                  /
 \----------------/ FEATURE
@vxhviet
vxhviet / androidMVP.md
Last active December 14, 2024 05:45
Android MVP General Guideline and Best Practices
@vxhviet
vxhviet / ffmpegCommands.md
Last active November 13, 2024 21:17
FFmpeg commands
@vxhviet
vxhviet / ffmpegVPlayerPart2.md
Last active October 16, 2024 09:17
How to use FFmpeg built by VPlayer in Android Studio?

Source: GitHub

Question: How to use FFmpeg built by VPlayer (version 0.3.2 at the time I write this Gist) in Android Studio?

Answer This will take the FFmpeg built from here and use it as a library for our project in Android Stuio in Window 10.

  1. Download NDK from here, uncompress it to anywhere you want (C:\Users\Viet\AppData\Local\Android\ndk\android-ndk-r11c in my case).
  2. Copy the whole VPlayer_lib folder build from here into the root of your project.
  3. In Android studio, click on app -> F4 -> SDK Location -> Android NDK location.
  4. Edit/create gradle.properties file in the root folder of your project with android.useDeprecatedNdk=true.
@vxhviet
vxhviet / matrixScaling.md
Last active July 1, 2024 14:28
Android scale bitmap with the highest quality

Source: StackOverflow

Question: How to scale Bitmap without losing much quality

Answer: Use Matrix instead of Bitmap.createScaledBitmap()

    /**
     * @param bitmap the Bitmap to be scaled
     * @param threshold the maxium dimension (either width or height) of the scaled bitmap
@vxhviet
vxhviet / regex.md
Created August 8, 2017 04:03
Regular Expression to find a string included between two characters while EXCLUDING the delimiters

Source: StackOverflow

Question: Regular Expression to find a string included between two characters while EXCLUDING the delimiters

Answer:

Easy done:

(?<=\[)(.*?)(?=\])

@vxhviet
vxhviet / saveToExternalStorage.md
Last active March 3, 2024 20:19
Android saving Bitmap to external storage.

Source: StackOverflow

Question: How do I save Bitmap to extrenal storage in Android?

Answer:

Use this function to save your bitmap in SD card:

public void saveTempBitmap(Bitmap bitmap) {
        if (isExternalStorageWritable()) {
@vxhviet
vxhviet / javaCV.md
Last active February 26, 2024 22:59
How to fucking add JavaCV to Android Studio

Source: Me, GitHub, following this for update GitHub

Question: How to fucking add JavaCV to Android Studio so I can use the fucking annoying FFmpeg?

Answer: This tut will use JavaCV 1.1, version 1.2 currently has SIGSEGV issue. JavaCV 1.1 comes with FFmpeg 2.8.1.

  1. Obtain the prebulit binaries here.
  2. Extract it and copy these files:
  • javacpp.jar (essential).
  • javacv.jar (essential).