Skip to content

Instantly share code, notes, and snippets.

View souhaiebtar's full-sized avatar
:octocat:
Focusing

souhaiebtar

:octocat:
Focusing
View GitHub Profile
@souhaiebtar
souhaiebtar / vim_tmux_setup.sh
Created July 15, 2018 21:33 — forked from fideloper/vim_tmux_setup.sh
Setup Vim+Vundle+Solarized+Tmux in a Vagrant Ubuntu box. This goes with my article on Vim+Tmux here: http://fideloper.com/mac-vim-tmux
#!/usr/bin/env bash
# Bash script to automate Vim+Tmux install as written about here:
# http://fideloper.com/mac-vim-tmux
# Test if Git is installed.
# Installing Git is not the job of this script
git --version 2>&1 >/dev/null
GIT_IS_INSTALLED=$?
@souhaiebtar
souhaiebtar / nginx-thingsboard
Created August 2, 2018 10:18 — forked from mfalkvidd/nginx-thingsboard
Thingsboard nginx reverse proxy with websocket and HTTPS support (Let's Encrypt)
server {
listen 80;
server_name EXTERNAL_THINGSBOARD_DOMAIN.com;
if ($scheme != "https") {
return 301 https://$host$request_uri;
} # managed by Certbot
}
server {
@souhaiebtar
souhaiebtar / docker-swarm-ports.md
Created September 13, 2018 10:23 — forked from BretFisher/docker-swarm-ports.md
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
souhaiebtar / get_latest_release.sh
Created September 18, 2018 23:46 — forked from lukechilds/get_latest_release.sh
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$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

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@souhaiebtar
souhaiebtar / jdk_download.sh
Created March 10, 2019 18:52 — forked from P7h/jdk_download.sh
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
@souhaiebtar
souhaiebtar / tmux-cheatsheet.markdown
Created March 12, 2019 13:11 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@souhaiebtar
souhaiebtar / trial.md
Created April 20, 2019 09:11 — forked from satish-setty/trial.md
Beyond Compare 4 license for Linux

Beyond Compare 4.x

Licensed to: ASIO Allsoftinone Quantity: 1 user Serial number: 1822-9597 License type: Pro Edition for Linux

First delete away trial mode:

sudo sed -i "s/keexjEP3t4Mue23hrnuPtY4TdcsqNiJL-5174TsUdLmJSIXKfG2NGPwBL6vnRPddT7tH29qpkneX63DO9ECSPE9rzY1zhThHERg8lHM9IBFT+rVuiY823aQJuqzxCKIE1bcDqM4wgW01FH6oCBP1G4ub01xmb4BGSUG6ZrjxWHJyNLyIlGvOhoY2HAYzEtzYGwxFZn2JZ66o4RONkXjX0DF9EzsdUef3UAS+JQ+fCYReLawdjEe6tXCv88GKaaPKWxCeaUL9PejICQgRQOLGOZtZQkLgAelrOtehxz5ANOOqCaJgy2mJLQVLM5SJ9Dli909c5ybvEhVmIC0dc9dWH+/N9KmiLVlKMU7RJqnE+WXEEPI1SgglmfmLc1yVH7dqBb9ehOoKG9UE+HAE1YvH1XX2XVGeEqYUY-Tsk7YBTz0WpSpoYyPgx6Iki5KLtQ5G-aKP9eysnkuOAkrvHU8bLbGtZteGwJarev03PhfCioJL4OSqsmQGEvDbHFEbNl1qJtdwEriR+VNZts9vNNLk7UGfeNwIiqpxjk4Mn09nmSd8FhM4ifvcaIbNCRoMPGl6KU12iseSe+w+1kFsLhX+OhQM8WXcWV10cGqBzQE9OqOLUcg9n0krrR3KrohstS9smTwEx9olyLYppvC0p5i7dAx2deWvM1ZxKNs0BvcXGukR+/g" /usr/lib/beyondcompare/BCompare
@souhaiebtar
souhaiebtar / readme.md
Created April 21, 2019 08:24 — forked from romuloctba/readme.md
Install Adobe Photoshop CS6 on Wine (Ubuntu, Elementary OS, Linux Mint)

Step 1. Install the Wine Team Ubuntu PPA

First start by installing Wine btw it's a utility to install windows apps in linux :

open the Terminal and :

   sudo add-apt-repository ppa:ubuntu-wine/ppa     
   sudo apt-get update && sudo apt-get upgrade
   sudo apt-get install wine1.7 winetricks
@souhaiebtar
souhaiebtar / photoshop.pol.sh
Created April 21, 2019 22:08 — forked from PedroHLC/photoshop.pol.sh
PlayOnLinux script for installing any photoshop version (x86) using winetricks
#!/bin/bash
# Create wineprefix using this script, install Photoshop, do not run it, then change wine version to '1.7.41-PhotoshopBrushes' emulating 'win7'
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
PREFIX='Photoshop'
WINEVERSION='1.9.3-staging'
TITLE='Adobe Photoshop'
EDITOR='Adobe Systems Inc.'