Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
moukoublen committed Sep 12, 2024
1 parent 8f8b36e commit f81b728
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 21 deletions.
15 changes: 8 additions & 7 deletions bin/UpdateOS
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/usr/bin/env bash

update_dnf() {
update-dnf() {
echo -e "\e[0;96m->\e[0m \e[0;90msudo dnf update --refresh\e[0m"
sudo dnf update --refresh
sudo dnf needs-restarting --reboothint
# https://dnf-plugins-core.readthedocs.io/en/latest/needs_restarting.html
}

update_apt() {
update-apt() {
echo -e "\e[0;96m->\e[0m \e[0;90msudo apt update\e[0m"
sudo apt update
echo -e "\e[0;96m->\e[0m \e[0;90msudo apt upgrade\e[0m"
Expand All @@ -17,18 +18,18 @@ update_apt() {
echo -e "\e[1;96m$(what-os)\e[0m with \e[1;36m$(what-pm)\e[0m"
case "$(what-pm)" in
"dnf")
update_dnf
update-dnf
;;
"apt")
update_apt
update-apt
;;
*)
prnt "this script does not have update command for this release"
echo "this script does not have update command for this release"
;;
esac

unset -f update_dnf
unset -f update_apt
unset -f update-dnf
unset -f update-apt



Expand Down
24 changes: 24 additions & 0 deletions bin/refresh-bashrcd
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

ff() {
if command -v "${1}" &> /dev/null; then
echo "${@} > ${HOME}/.bashrc.d/${1}-completion.bash"
"${@}" > "${HOME}"/.bashrc.d/"${1}"-completion.bash
fi
}


ff fzf --bash
ff elastic-package completion bash
ff devenv completion bash

case "$(uname)" in
"Linux")
ff delta --generate-completion bash
ff helm completion bash
ff k9s completion bash
ff kind completion bash
ff minikube completion bash
ff starship completions bash
;;
esac
2 changes: 2 additions & 0 deletions config/vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
},
"gitlens.codeLens.enabled": false,
// <golang>
// https://github.com/golang/vscode-go/wiki/settings
"[go]": {
"editor.tabSize": 2,
"editor.insertSpaces": false,
Expand Down Expand Up @@ -221,6 +222,7 @@
//"editor.selectionBackground": "#bb0d8a8c",
"tab.activeBorderTop":"#0078d4",
"tab.hoverBorder": "#0078d4",
"editorGutter.deletedBackground":"#37373d",
},
"[GitHub Dark Default]": {
// https://primer.style/primitives/storybook/?path=/story/color-base-scales--all-scales&globals=theme:dark
Expand Down
20 changes: 20 additions & 0 deletions docker/pgadmin/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
services:
# https://hub.docker.com/r/dpage/pgadmin4/tags
node_exporter:
image: dpage/pgadmin4
container_name: pgadmin4
restart: unless-stopped
#pid: host
network_mode: host
# ports:
# - "32400:32400/tcp"
# - "1900:1900/udp"
# - "1901:1901/udp"
# #- "5353:5353/udp"
# - "8324:8324/tcp"
# - "32410:32410/udp"
# - "32412:32412/udp"
# - "32413:32413/udp"
# - "32414:32414/udp"
# - "32469:32469/tcp"
# - "3005:3005"
21 changes: 7 additions & 14 deletions scripts/install-fonts-locally
Original file line number Diff line number Diff line change
Expand Up @@ -210,17 +210,9 @@ __fnt_sourcecodepro() {


__install_ibmplex() {
local FLD
FLD="$(ls -d "${1}"/*/ | head -n 1)"

mkdir -p "${2}/ibm_plex_mono"
cp -r "${FLD}/IBM-Plex-Mono/fonts/complete/otf" "${2}/ibm_plex_mono"

mkdir -p "${2}/ibm_plex_sans"
cp -r "${FLD}/IBM-Plex-Sans/fonts/complete/otf" "${2}/ibm_plex_sans"

mkdir -p "${2}/ibm_plex_serif"
cp -r "${FLD}/IBM-Plex-Serif/fonts/complete/otf" "${2}/ibm_plex_serif"
find "${1}/packages" -type d -path '*/fonts/complete/otf' 2>/dev/null | while read -r dir; do
cp "${dir}"/*.otf "${2}"
done
}
__fnt_ibmplex() {
__installing "IBM Plex"
Expand All @@ -229,9 +221,10 @@ __fnt_ibmplex() {
local URL

BODY="$( curl --fail --silent --show-error --location https://api.github.com/repos/IBM/plex/releases/latest )"
REMOTE_VERSION="$( echo $BODY | jq '.tag_name' --raw-output | sed 's/^v//g' )"
URL="$( echo $BODY | jq '.zipball_url' --raw-output )"
__install_font_locally "${URL}" "ibmplex.zip" "ibm_plex" __decomp __install_ibmplex "${REMOTE_VERSION}"
REMOTE_VERSION="$( echo $BODY | jq '.tag_name' --raw-output | sed 's/^v//g' | sed 's/[@\/]/_/g' )"
#URL="$( echo $BODY | jq '.zipball_url' --raw-output )"
URL="https://github.com/IBM/plex/archive/refs/heads/master.zip"
__install_font_locally "${URL}" "ibmplex.zip" "ibmplex" __decomp __install_ibmplex "${REMOTE_VERSION}"
}


Expand Down

0 comments on commit f81b728

Please sign in to comment.