Skip to content

Instantly share code, notes, and snippets.

View dzungvu's full-sized avatar

Vũ Thế Dũng dzungvu

  • Hochiminh City
View GitHub Profile
@dzungvu
dzungvu / compose.yaml
Created March 14, 2026 15:01 — forked from ironicbadger/compose.yaml
searxng docker compose yaml
services:
searxng:
container_name: searxng
image: docker.io/searxng/searxng:latest
restart: unless-stopped
ports:
- 8080:8080
volumes:
- ./searxng:/etc/searxng:rw
environment:
@dzungvu
dzungvu / docker-installation-linux.sh
Created March 14, 2026 14:50
Install docker compose on linux
# Update your package index and install necessary prerequisite packages:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release
# Add Docker's official GPG key and set up the repository:
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
@dzungvu
dzungvu / create_ssh_key_guide.txt
Created December 2, 2023 15:42
create ssh key with custom location and name
#create ssh key with specified location and name
ssh-keygen -t ed25519 -f ~/.ssh/key_name -C "name@example.com"
eval "$(ssh-agent -s)"
open ~/.ssh/config
#in case config file does not exist
touch ~/.ssh/config
@dzungvu
dzungvu / print_keystore_info.gradle
Last active June 22, 2023 01:39
Print current build info: Key store, key alias, key pass. In case you checked remember password check-box in Generate Signed Bundle/Apk
afterEvaluate {
if (project.hasProperty("android.injected.signing.store.file")) {
println "key store path: ${project.property("android.injected.signing.store.file")}"
}
if (project.hasProperty("android.injected.signing.store.password")) {
println "key store password: ${project.property("android.injected.signing.store.password")}"
}
if (project.hasProperty("android.injected.signing.key.alias")) {
println "key alias: ${project.property("android.injected.signing.key.alias")}"
}
//delegate
class DistanceCalculator() {
fun calculate(vihecle: Vihecle, time: Float): Float {
return vihecle.speed * time
}
}
abstract class Vihecle(open val speed: Float, val model: String) {
//use the delegate instead of override travel function in each subclass
val distanceCalculator = DistanceCalculator()
private fun onShare() {
val sendIntent: Intent = Intent().apply {
action = Intent.ACTION_SEND
type = "text/plain"
putExtra(Intent.EXTRA_TEXT, "Share default content")
}
val textEmail = "Share content use for email"
val textSMS = "Share content use for sms"
val textOther = "Share content for other app"
@dzungvu
dzungvu / README.md
Created February 10, 2022 10:30 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

#!/bin/bash
jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -storepass abcdxyzt1234 -keystore my-key.keystore app-release.aab alias_name
cmd /c "jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -storepass abcdxyzt1234 -keystore my-key.keystore app-release.aab alias_name"