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 / readme.md
Last active September 6, 2017 20:20
make portainer accessible using domain(in our case portainer.test.dev)
reverseProxyPortainer
├── portainer
│   └── docker-compose.yml
└── reverseProxy
    ├── docker-compose.yml
    └── vhost.d
        └── portainer.test.dev
@souhaiebtar
souhaiebtar / gist:be76884c517084f005ef1e8ba7cda44e
Created September 17, 2017 17:16
install docker on ubuntu 1604
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
26 stable"
sudo apt-get update
sudo usermod -aG docker ${USER}
@souhaiebtar
souhaiebtar / install_zprezto.sh
Last active September 24, 2017 21:29
install zprezto on ubuntu
#!/bin/bash
clear
sudo apt-get -y install git zsh
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
ln -s ~/.zprezto/runcoms/zlogin ~/.zlogin
ln -s ~/.zprezto/runcoms/zlogout ~/.zlogout
ln -s ~/.zprezto/runcoms/zpreztorc ~/.zpreztorc
@souhaiebtar
souhaiebtar / .zpreztorc
Last active September 24, 2017 21:35
zprezto
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
@souhaiebtar
souhaiebtar / .vimrc
Last active September 25, 2017 20:25
my vim config file
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
call plug#begin('~/.vim/plugged')
" Plugins go here
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive'
Plug 'vim-syntastic/syntastic'
Plug 'nanotech/jellybeans.vim'
Plug 'Lokaltog/vim-powerline'
@souhaiebtar
souhaiebtar / .zshrc
Last active September 25, 2017 20:28
my zshrc file with prezto sourcing and powerlevel9 config
POWERLEVEL9K_MODE='awesome-patched'
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
#will show the context in the tab title
case $TERM in
xterm*)
@souhaiebtar
souhaiebtar / installzprezto.sh
Created October 25, 2017 23:10
install zsh git, than install zprezto and configure it, and change them to powerlevel9k, done on ubuntu
#!/usr/bin/env bash
#sudo sh installzprezto.sh $(whoami)
apt-get -y install git zsh
wget -O /usr/local/share/fonts/sourcecodepro.ttf https://github.com/Falkor/dotfiles/blob/master/fonts/SourceCodePro+Powerline+Awesome+Regular.ttf?raw=true
fc-cache -f -v
different_user=$1
echo "Current user: $(whoami)"
@souhaiebtar
souhaiebtar / applescript: fix tap to click on osx sierra
Last active March 25, 2018 14:35
System Preferences > Trackpad > Point & Click > "Tap to Click" is disabled even if the checkbox corresponding to it is checked, to fix it i created an apple script that enable it and if it's already enabled it than it unchecked and checked it again
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.trackpad"
end tell
tell application "System Events"
tell process "System Preferences"
repeat until exists tab group 1 of window "Trackpad"
end repeat
<picture>
<source media="(max-width: 799px)" srcset="dog-300w.jpg">
<source media="(min-width: 800px)" srcset="dog-800w.jpg">
<img src="dog-800w.jpg" alt="A very cute dog">
</picture>
@souhaiebtar
souhaiebtar / i2cdisplay_ wemos.ino
Created July 11, 2018 18:33
#arduino #esp8266 #wemosd1
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Address,EN,RW , RS, D4,D5,D6,D7,BackLight,BL_Polarity
//LiquidCrystal_I2C lcd1(0x26, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
LiquidCrystal_I2C lcd2(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
void setup()
{