Skip to content

Instantly share code, notes, and snippets.

View geokal's full-sized avatar

George Kal geokal

  • Fogus Innovations & Services
  • Athens, Greece
View GitHub Profile

.NET Workload Troubleshooting

To install the maui workload, you have two options:

  1. dotnet workload install commands
  2. Visual Studio on Windows can install .msi files for each workload pack. Note that the concept of a "Visual Studio workload" is different than a ".NET workload".

VS for Mac's installer and updater use dotnet workload install commands. It's considerably simpler to get a Mac machine to a clean state.

Mac

@geokal
geokal / battery_limit.zsh
Created October 5, 2024 08:21 — forked from NightMachinery/battery_limit.zsh
A guide on limiting macOS battery charging to at most 80%.
# Apple Silicon laptops with firmware > 13.0 have a native charge threshold that does not required any userspace daemon running.
# This native limit works even when the laptop is sleeping or powered off therefore it is preferable to the userspace daemon.
# Nonetheless, it only works with fixed thresholds (80% as upper limit and 70% as lower limit).
# CHWA key is the one used to enable/disable the native limit. 01 = 80% limit, 00 = no limit
##
typeset -g smc_command="/usr/local/bin/smc"
typeset -g smc_charge_limit_key="CHWA"
typeset -g smc_charge_limit_status_on="01"
typeset -g smc_charge_limit_status_off="00"
@geokal
geokal / HttpFactoryInBlazorWASM.md
Created September 25, 2024 09:43 — forked from xiaomi7732/HttpFactoryInBlazorWASM.md
Use HttpFactory for multiple HttpClients in Blazor WASM

Use HttpFactory for multiple HttpClients in Blazor WASM

Description

HttpClient Factory pattern allows multiple named http client for various backend. This is a note about how to use it in Blazor WASM (.NET 6).

Short version: Same as in a Web API.

Details

Pipe error solve:
https://www.youtube.com/watch?v=9F9AcMYh8yQ
PHP XAMPP SETUP:
one in all : https://www.youtube.com/watch?v=28dc3edU2Uc
https://www.youtube.com/watch?v=HKuoc1KrOKs

What do Etcd, Consul, and Zookeeper do?

  • Service Registration:
    • Host, port number, and sometimes authentication credentials, protocols, versions numbers, and/or environment details.
  • Service Discovery:
    • Ability for client application to query the central registry to learn of service location.
  • Consistent and durable general-purpose K/V store across distributed system.
    • Some solutions support this better than others.
    • Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state.
  • Centralized locking can be based on this K/V store.
@geokal
geokal / go-stdlib-interface-selected.md
Created September 17, 2023 20:04 — forked from asukakenji/go-stdlib-interface-selected.md
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@geokal
geokal / local-registry.md
Created April 27, 2023 10:09 — forked from trisberg/local-registry.md
Using a Local Registry with Minikube

Using a Local Registry with Minikube

Install a local Registry

These instructions include running a local registry accessible from Kubernetes as well as from the host development machine at registry.dev.svc.cluster.local:5000.

  1. Use the docker CLI to run the registry:2 container from Docker, listening on port 5000, and persisting images in the ~/.registry/storage directory.
@geokal
geokal / README.md
Created November 24, 2019 17:59 — forked from Lazza/README.md
VPNGate Python script

vpngate.py

This script allows to use the free VPN service provided by VPNGate in an easy way. The user just needs to provide the desidered output country, and the script automatically chooses the best server.

After this step, OpenVPN is launched with the proper configuration. The VPN can be terminated by pressing Ctrl+C.

Usage

Run the script by providing the desired output country:

@geokal
geokal / regexCheatsheet.js
Created April 11, 2019 19:59 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@geokal
geokal / youtube.sh
Created November 23, 2018 19:35 — forked from dantheman213/youtube-dl_cheatsheet.md
youtube-dl cheatsheet -- Download entire youtube playlist and more!
# https://github.com/rg3/youtube-dl/
# On ubuntu: apt-get install libav-tools
# Download Playlist to batch of MP3s
youtube-dl -f bestvideo+bestaudio --extract-audio --audio-format mp3 --prefer-avconv --playlist-random https://www.youtube.com/playlist?list=XXXXX
# Download individual song
youtube-dl -f bestvideo+bestaudio --extract-audio --audio-format mp3 --prefer-avconv https://www.youtube.com/watch?v=ZZZZZZZ