Skip to content

Instantly share code, notes, and snippets.

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

Mohamed Bouyagui Gassama bouyagas

🏠
Working from home
View GitHub Profile
@bouyagas
bouyagas / SSH-configuration-github-gitlab.md
Created November 21, 2023 16:32 — forked from marcoandre1/SSH-configuration-github-gitlab.md
Managing SSH keys for Github and Gitlab

Managing SSH keys for Github and Gitlab

NOTICE: This guide will help you set ssh keys for GitHub and GitLab. However, this is not going to change your commit user.name or user.email. If you need to change those for specific repositories, just run the following commands while in your repository:

git config user.name "Your Name Here"
git config user.email [email protected]

For more info, see this answer. Also, keep in mind this only changes the .git folder inside your repository which never gets added/committed/pushed/uploaded.

I recently had to manage two ssh keys (one for Github and one for Gitlab). I did some research to find the best solution. I am justing putting the pieces together here.

local present, tzen = pcall(require, "true-zen")
if not present then
return
end
local truezen_config = {
ui = {
bottom = {
laststatus = 0,
ruler = false,
@bouyagas
bouyagas / .bashrc
Created July 21, 2023 16:35
alliases
# Aliases
# Tmux
alias tmux='tmux -2'
alias t='tmux attach || tmux new-session'
alias ta='tmux attach -t'
alias tn='tmux new-session'
alias tna='tmux -a -t'
alias tl='tmux ls'
alias tkt='tmux kill-session -t'
@bouyagas
bouyagas / .tmux.conf
Created July 21, 2023 16:20
tmux confire
# Default termtype. If the rcfile sets $TERM, that overrides this value.
# Add truecolor support
set-option -g default-terminal "screen-256color"
set-option -sa terminal-features ',xterm-256color:RGB'
# support logging out and back in
set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION"
@bouyagas
bouyagas / tmux-cheatsheet.markdown
Created May 28, 2023 19:32 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@bouyagas
bouyagas / tmux split-window subcommand.md
Created May 15, 2023 00:19 — forked from sdondley/tmux split-window subcommand.md
Super Guide to the split-window tmux Subcommand (and Beyond)

Super Guide to the split-window tmux Subcommand (and Beyond)

Guide overview

tmux, like other great software, is deceptive. On the one hand, it's fairly easy to get set up and start using right away. On the other hand, it's difficult to take advantage of tmux's adanced power features without spending some quality alone time with the manual. But the problem with manuals is that they aren't geared toward beginners. They are geared toward helping seasoned developers and computer enthusiasts quickly obtain the

@bouyagas
bouyagas / strsplit.rs
Created November 24, 2021 18:14 — forked from jonhoo/strsplit.rs
#![warn(rust_2018_idioms)]
#[derive(Debug)]
pub struct StrSplit<'haystack, D> {
remainder: Option<&'haystack str>,
delimiter: D,
}
impl<'haystack, D> StrSplit<'haystack, D> {
pub fn new(haystack: &'haystack str, delimiter: D) -> Self {
@bouyagas
bouyagas / euclid.rs
Created November 7, 2021 04:47 — forked from Steelbirdy/euclid.rs
The Euclidean Algorithm implemented entirely in the Rust type system.
#![feature(generic_associated_types)]
use std::marker::PhantomData;
macro_rules! num {
() => { Z };
(* $($rest:tt)*) => { S<num!($($rest)*)> };
}
macro_rules! print_gcd {
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
scriptencoding utf-5
source ~/.config/nvim/plugins.vim
" ============================================================================ "
" === EDITING OPTIONS === "
" ============================================================================ "
" Remap leader key to space
let mapleader = ' '