Skip to content

Instantly share code, notes, and snippets.

View bgizdov's full-sized avatar
๐Ÿ๏ธ

Borislav Gizdov bgizdov

๐Ÿ๏ธ
View GitHub Profile
@bgizdov
bgizdov / QuarkusProfileUtil.java
Created November 2, 2024 22:02
Utility class for getting Quarkus active profiles
package com.github.bgizdov.util;
import io.quarkus.runtime.configuration.ConfigUtils;
import java.util.List;
import java.util.Objects;
/** Utility class for getting Quarkus active profiles. */
public class QuarkusProfileUtil {
public static final String DEV = "dev";
public static final String PROD = "prod";
@bgizdov
bgizdov / docker container with specific versions of node, alpine and npm
Created May 5, 2023 10:10
docker container with specific versions of node, alpine and npm
Here is my solution which is using unofficial node builds from https://nodejs.org/en/download
1. Create Dockerfile, with desired alpine, node and npm versions
In the example:
- alpine v3.17.2
- nodejs v18.16.0
- npm v9.6.6
@bgizdov
bgizdov / clean.sh
Created January 29, 2022 16:59 — forked from vsnthdev/clean.sh
MIUI Bloatware Removal Script
#!/usr/bin bash
# DEFINE THE BLOATWARE APPLICATIONS WHICH
# ARE SAFE TO BE REMOVED
declare -a bloatware=(
# Google Bloatware
"com.google.android.apps.docs" # Google Docs
# "com.google.android.apps.maps" # Google Maps
# "com.google.android.apps.photos" # Google Photos
"com.google.android.apps.tachyon" # Google Duo
CODE_BASE=(./project1
./project2
./lib1
./lib2
)
EXCLUDE_PATT="gitRepoYouWantToIgnore" #this is regex
today="$(date +%a)"
sinche="1.days"
case "${today}" in
# add to .bashrc .bash_profile
function perf {
curl -I -s -w "%{time_connect} + %{time_starttransfer} = %{time_total}\n" "$1"
}
curl_time() {
curl -I -s -w "\
namelookup: %{time_namelookup}s\n\
connect: %{time_connect}s\n\
alias speedtest="curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -"
alias ll="exa -bghHliS"
alias screenshot="adb shell screencap -p | sed 's/\r$//' > ~/Pictures/screen-$(date +"%Y%m%d-%H%M").png"
alias changejava="sudo update-alternatives --config java && sudo update-alternatives --config javac"
@bgizdov
bgizdov / mp3_cp1251_to_utf8_id3_tag.sh
Last active November 2, 2024 22:04
convert mp3 cp1251/windows-1251 id3 tags to utf8
sudo apt install python-mutagen
find . -name "*.mp3" -print0 | xargs -0 mid3iconv -e CP1251 -d