Skip to content

Instantly share code, notes, and snippets.

View ValchanOficial's full-sized avatar
:octocat:
Happy Octocat

Valéria Padilha de Vargas ValchanOficial

:octocat:
Happy Octocat
View GitHub Profile
@ValchanOficial
ValchanOficial / gist:828ccfb71de62a39744e9c3a07fcd9fa
Last active June 9, 2023 12:25
[Kind K8S WSL2] How to install Kind into WSL2
# For x86_64
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.19.0/kind-linux-amd64 // check version here: https://kind.sigs.k8s.io/
# For ARM64
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.19.0/kind-linux-arm64
chmod +x ./kind
sudo mv ./kind /usr/local/bin
kind version // kind v0.19.0 go1.20.4 linux/amd64
# create cluster-config.yml
@ValchanOficial
ValchanOficial / gist:75da0ef889710d5b80b1ea3e3ed93667
Created June 9, 2023 00:43
[kubectl WSL2] How to install kubectl into WSL2
// check release here -> https://kubernetes.io/releases/
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.27.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
windowsUser=$1
mkdir -p ~/.kube
ln -sf "/mnt/c/users/$windowsUser/.kube/config" ~/.kube/config
@ValchanOficial
ValchanOficial / gist:ce341d0409622fa78dfee2c91e1b2cf4
Last active June 9, 2023 01:18
[Golang] How to install Go into WSL2
sudo apt update
sudo apt upgrade
sudo apt install golang-go
go version
export GO111MODULE=on
@ValchanOficial
ValchanOficial / gist:e93c0f2e0cf24fcedf9b17f852cef174
Created June 6, 2023 02:59
[SonarCloud] No coverage information will be saved because all LCOV files cannot be found for my javascript project using Github actions
https://community.sonarsource.com/t/no-coverage-information-will-be-saved-because-all-lcov-files-cannot-be-found-for-my-javascript-project-using-github-actions/52046/7
@ValchanOficial
ValchanOficial / gist:0cbbb88714470c199c53f401a78b5edd
Created May 27, 2023 22:14
[Git] ssh: Could not resolve hostname github.com: Temporary failure in name resolution
sudo nano /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
@ValchanOficial
ValchanOficial / gist:4c7468d5ae436647394ece34578c4495
Last active May 26, 2023 00:03
[Github][GPG Key] generating a new gpg key
sudo apt install gnupg
gpg --full-generate-key
- RSA
- 4096 bits
- 0 // when it will expires
- name: <your name>
- email: <your email>
- comment:
@ValchanOficial
ValchanOficial / gist:7c57dfdeafdbff49afc511bb7293a0a0
Created May 25, 2023 23:16
[Github][SSH Key] Generating a new ssh key
ssh-keygen -t rsa -b 4096 -C "<[email protected]>"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub
------------------------------------------------------
Git error: "Host Key Verification Failed" when connecting to remote repository
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
https://stackoverflow.com/a/29380765/11842937
@ValchanOficial
ValchanOficial / gist:63deb1317a6ed5afa5da86ff6b2d10ec
Created May 24, 2023 11:36
[Docker] strconv.Atoi: parsing "": invalid syntax
sudo docker system prune
https://github.com/docker/compose-cli/issues/1537#issuecomment-1310735139
@ValchanOficial
ValchanOficial / gist:f3ac162564e02ed9783f23e028caa613
Created May 13, 2023 20:17
[WSL2] wget: unable to resolve host address ‘update.code.visualstudio.com’
sudo nano /etc/resolv.conf
nameserver 8.8.8.8
https://stackoverflow.com/a/75421353/11842937
@ValchanOficial
ValchanOficial / gist:4e52d26d3b102da64c107b37092a8b27
Created April 13, 2023 13:50
[Javascript] How can I do string interpolation in JS?
const enums = {
MESSAGE: "Message {test}",
MANY_MESSAGES: "Message {test} {example}",
};
// way 1
console.log(enums.MESSAGE.replace("{test}", "Example")); // Message Example
// way 2
String.prototype.supplant = function (o) {