Skip to content

Instantly share code, notes, and snippets.


Jérémie Payet jpcweb

View GitHub Profile
jpcweb /
Created May 26, 2023 20:23 — forked from miztiik/
Adding multiple remote url to git repo

Add Multiple Remotes URLs to git

Adding the first remote origin

git remote add origin remote_1_url
git remote set-url origin remote_1_url

# Set the default remote branch for the current local branch
git branch --set-upstream master
# or
jpcweb /
Created November 25, 2021 07:00 — forked from sbailliez/
Vagrant and VMWare Tech Preview on Apple M1 Pro

Vagrant and VMWare Tech Preview on Apple M1 Pro

This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated from discussions in hashicorp/vagrant-vmware-desktop#22

Installing Rosetta

First install Rosetta if not already done, this is needed to run x86 code:

jpcweb / gist:2ab5a996ab7b9d6d01f6140b9cbbcbe0
Last active February 9, 2021 09:08
Alacritty key bindings (curl braces, etc...) for french keyboard
View gist:2ab5a996ab7b9d6d01f6140b9cbbcbe0
# Find out which key you are pressing looking at Alacritty events
alacritty --print-events | grep "WindowEvent.*KeyboardInput"
vim ~/.config/alacritty/alacritty.yml
# French keyboard works on MAC
- { key: LBracket, mods: Alt, chars: "{" }
- { key: RBracket, mods: Alt, chars: "}" }
- { key: LBracket, mods: Alt|Shift,chars: "[" }
jpcweb /
Created December 31, 2020 02:49 — forked from sudara/
Github style syntax highlighting in

I like, but don't want to deal with constantly copying and pasting code around.

Here is how I do syntax highlighting in by pressing a key command. It's based off of this post on stack exchange.

install pygments

sudo easy_install Pygments

install github syntax

jpcweb / Ansible-Vault
Created December 9, 2020 23:45 — forked from tristanfisher/Ansible-Vault
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.
View Ansible-Vault

Working with ansible-vault

I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

jpcweb /
Last active October 29, 2020 19:38
How to set up multiple accounts with [Mutt]( E-mail Client

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg


Directories and files

jpcweb / .tmux.conf
Last active September 12, 2020 03:05 — forked from paulodeleo/.tmux.conf
Tmux configuration to enable mouse scroll and mouse panel select, taken from:
View .tmux.conf
set -g mouse on
# Scroll History
set -g history-limit 30000
# Set ability to capture on start and restore on exit window data when running an application
setw -g alternate-screen on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
set -s escape-time 50
View riemann-dash-recipes.markdown

Application specific host grouping in Riemann-dash

It is generally desirable to group all the hosts for a specific service into a single dashboard view. For example, all the web servers are in single view while all the database servers are in another view.

This is usually not an issue when you are sending custom metrics using Riemann client. However, there are cases where you are using something that you do not control how the metrics are being sent. i.e., Riemann-tools.

Since Riemann-tools scripts are application agnostic, in order for the dashboard view to group hosts, we must inject some application specific information into the tags field. Tags is a collection of arbitrary strings. In the case of Riemann-tools scripts you can pass in arbitrary strings on the command line.

riemann-health --host --tag "prod" --tag "webserver"

jpcweb / gist:860c3aa793ee0e483279c96cb38f3490
Created June 20, 2020 11:24
Easy steps for Ansible, git private repo and ssh agent forwarding
View gist:860c3aa793ee0e483279c96cb38f3490
# Make sure your key is added to ssh-agent
ssh-add ~/.ssh/my_id_rsa
# ~/.ssh/config
Host my-remote-ansible-host
ForwardAgent yes
# OR
# In your ansible.cfg file
ssh_args = -o ForwardAgent=yes