Skip to content

Instantly share code, notes, and snippets.

@techcaotri
techcaotri / current_ip.txt
Created September 19, 2024 06:41
Current Laptop Public IP
14.238.91.82
@techcaotri
techcaotri / build_ffmpeg_cuda.md
Last active June 4, 2024 07:55
Build FFmpeg with NVIDIA CUDA support and create the Debian package (.deb) file

Summary:

This is a fork of https://github.com/markus-perl/ffmpeg-build-script/blob/master/build-ffmpeg with minor modifications to install the binaries to /usr/local/ folder, adhering to the .deb file installation process.

build_ffmpeg script:

#!/bin/bash

# HOMEPAGE: https://github.com/markus-perl/ffmpeg-build-script
# LICENSE: https://github.com/markus-perl/ffmpeg-build-script/blob/master/LICENSE
@techcaotri
techcaotri / build_apollo_2.5_visualizer.md
Last active January 12, 2021 03:41
Build Apollo 2.5 with Perception Visualizer
@techcaotri
techcaotri / make_audiobook.py
Created November 7, 2020 17:29 — forked from madebyollin/make_audiobook.py
Converts an epub or text file to audiobook via Google Cloud TTS
#!/usr/bin/env python3
"""
To use:
1. install/set-up the google cloud api and dependencies listed on https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/texttospeech/cloud-client
2. install pandoc and pypandoc, also tqdm
3. create and download a service_account.json ("Service account key") from https://console.cloud.google.com/apis/credentials
4. run GOOGLE_APPLICATION_CREDENTIALS=service_account.json python make_audiobook.py book_name.epub
"""
import re
import sys
@techcaotri
techcaotri / aosp-101.md
Created August 16, 2020 17:59 — forked from tinntt/aosp-101.md
AOSP 101

There are 3 steps:

  • Setup & Download
  • Build
  • Flash

Before you start, please be calm in any situation :v.

Step 1, Setup & Download:

  • At least 250GB of free disk space to check out the code and an extra 150 GB to build it. If you conduct multiple builds, you need additional space.
  • You need repo tool to download the source:
@techcaotri
techcaotri / Set Property from android application
Last active August 16, 2020 18:25 — forked from gohilbhagirath90/Set Property from android application
Set System Properties from android application
==> Add in AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:sharedUserId="android.uid.system"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.example"
>
==> Android Source :
// For Properties permission
// Properties which start with "debug." have both SYSTEM & SHELL permisiion to edit