Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block souhaiebtar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View zpreztorc
# Sets Prezto options.
# Authors:
# Sorin Ionescu <>
# General
souhaiebtar / .vimrc
Last active Sep 1, 2018
vim default config
View .vimrc
call plug#begin('~/.vim/plugged')
" Plugins go here
Plug 'sickill/vim-monokai'
Plug 'tpope/vim-sensible'
Plug 'ekalinin/Dockerfile.vim'
Plug 'mattn/vim-fz'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'scrooloose/nerdtree'
souhaiebtar /
Created Jul 15, 2018 — forked from fideloper/
Setup Vim+Vundle+Solarized+Tmux in a Vagrant Ubuntu box. This goes with my article on Vim+Tmux here:
#!/usr/bin/env bash
# Bash script to automate Vim+Tmux install as written about here:
# Test if Git is installed.
# Installing Git is not the job of this script
git --version 2>&1 >/dev/null
souhaiebtar /
Last active Sep 25, 2018
Post install script ubuntu 1604 shell
#!/usr/bin/env sh
CAN_I_RUN_SUDO=$(sudo -n uptime 2>&1|grep "load"|wc -l)
if [ $CAN_I_RUN_SUDO -ne 0 ]; then
echo "Installing sudo"
apt-get install -y sudo
# function to get distro and version used by vim install
get_distribution_version() {
souhaiebtar / .zshrc
Last active Jul 24, 2018
zshrc file
View .zshrc
# Executes commands at the start of an interactive session.
# Authors:
# Sorin Ionescu <>
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
souhaiebtar / nginx-thingsboard
Created Aug 2, 2018 — forked from mfalkvidd/nginx-thingsboard
Thingsboard nginx reverse proxy with websocket and HTTPS support (Let's Encrypt)
View nginx-thingsboard
server {
listen 80;
if ($scheme != "https") {
return 301 https://$host$request_uri;
} # managed by Certbot
server {
souhaiebtar /
Created Sep 13, 2018 — forked from BretFisher/
Docker Swarm Port Requirements, both Swarm Mode 1.12+ and Swarm Classic, plus AWS Security Group Style Tables

Docker Swarm Mode Ports

Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.

Inbound Traffic for Swarm Management

  • TCP port 2377 for cluster management & raft sync communications
  • TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
  • UDP port 4789 for "data plane" VXLAN overlay network traffic
  • IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option

AWS Security Group Example

souhaiebtar /
Created Sep 18, 2018
ssh login email alert #ssh #login #mail
if [ "$PAM_TYPE" != "close_session" ]; then
FROM='Login Alert <>'
TEXT="At $DATE a login occurred for $PAM_USER on the VPS from $PAM_RHOST"
curl -s --user $APK \ \
souhaiebtar /
Created Sep 18, 2018 — forked from lukechilds/
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name:

You can’t perform that action at this time.