Skip to content

Instantly share code, notes, and snippets.

View saveman71's full-sized avatar

Antoine Bolvy saveman71

View GitHub Profile
# Query/use custom command for `git`.
zstyle -s ":vcs_info:git:*:-all-" "command" _omz_git_git_cmd
: ${_omz_git_git_cmd:=git}
#
# Functions
#
# The name of the current branch
# Back-compatibility wrapper for when this function was defined here in
# Change prefix key to Ctrl+a
unbind C-b
set -g prefix C-q
## FIX for termnator mouse bugs
## see https://superuser.com/questions/417027/why-are-random-characters-inserted-into-my-tmux-session
#set -g mouse-utf8 off
## set the default TERM
set -g default-terminal "screen"
@saveman71
saveman71 / aws-authorize-ip.sh
Created April 15, 2021 08:34
Script to authorize an IP on a security group, both for SSH and MOSH
#!/bin/bash
set -e
sg=$1;
description=$2;
ip=$(curl https://checkip.amazonaws.com);
# Regular SSH
aws ec2 authorize-security-group-ingress --group-id $sg \

Keybase proof

I hereby claim:

  • I am saveman71 on github.
  • I am saveman71 (https://keybase.io/saveman71) on keybase.
  • I have a public key ASDRcbCcuzHYo-qYK4Y68wiqzRXtRa4P6t0FmkzozgiZqwo

To claim this, I am signing this object:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@saveman71
saveman71 / splitToSentencesFrench.js
Created October 22, 2015 08:37
This regex will split a text in sentences respecting punctuation, and thinks like "M. Lastname" will not break the sentence
var sentences = text.match(/(M\.|Mme\.|Mlle\.|\.\w|(?:\.\.\.|…)\s+[a-z]|[^\.!\?\n…])+[\.!\?\n…]+/g);