Skip to content

Instantly share code, notes, and snippets.

View ptavares's full-sized avatar
🏠
Working from home

Patrick Tavares ptavares

🏠
Working from home
  • Bpifrance
  • France
View GitHub Profile
@ptavares
ptavares / install_golang.sh
Created December 14, 2022 19:57
Insall or reinstall Golang
export GO_VERSION=1.19.X
wget -q -O - https://git.io/vQhTU | bash -s -- --version $GO_VERSION
wget -q -O - https://git.io/vQhTU | bash -s -- --remove && wget -q -O - https://git.io/vQhTU | bash -s -- --version $GO_VERSION # resintall Golang
@ptavares
ptavares / helm_install_or_update.sh
Created February 15, 2022 20:25
Install / Update Helm in one line using unix tools : curl / jq / tar and copy binary to $USER/.local/bin directory
# One line Helm install / update
curl -L "$(curl -s https://api.github.com/repos/helm/helm/releases/latest | jq -r .body | grep -o -E "https://get.+?-linux-amd64.tar.gz" | cut -d ")" -f 1)" > /tmp/helm.tar.gz && tar xvzf /tmp/helm.tar.gz && mv /tmp/linux-amd64/helm ~/.local/bin/ && rm -rf helm.tar.gz linux-amd64
@ptavares
ptavares / 2repos-sync.sh
Created February 3, 2021 12:50 — forked from yorammi/2repos-sync.sh
Sync 2 remote repositories script - Just define the 3 variables (use export command for that!)
#!/bin/bash
# REPO_NAME=<repo>.git
# ORIGIN_URL=git@<host>:<project>/$REPO_NAME
# REPO1_URL=git@<host>:<project>/$REPO_NAME
rm -rf $REPO_NAME
git clone --bare $ORIGIN_URL
if [ "$?" != "0" ]; then
echo "ERROR: failed clone of $ORIGIN_URL"
### Keybase proof
I hereby claim:
* I am ptavares on github.
* I am ptavares (https://keybase.io/ptavares) on keybase.
* I have a public key ASA4-ARJBO6K0gt_8dGlcJEFsPb1HReNMDhsvY-qK0Ns9go
To claim this, I am signing this object:
# Générer une paire de clé
ssh-keygen -t [dsa/rsa] -C "comment"
# Permet d'afficher la clé public d'une clé privée
ssh-keygen -y -f <private_key>
@ptavares
ptavares / 0_reuse_code.js
Created November 2, 2016 11:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#Git Prompt
source /etc/bash_completion.d/git
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
@ptavares
ptavares / .bashrc
Last active January 27, 2016 14:56
#color
LS_COLORS=$LS_COLORS:'di=0;35:'
export LS_COLORS
alias la='ls -la'
alias lla='ls -lrta'
alias ll='ls -lrt'
alias ..='cd ..'
alias pss='ps -edf|grep '
alias vi='vim'