Skip to content

Instantly share code, notes, and snippets.

souhaiebtar

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
@souhaiebtar
souhaiebtar / readme.md
Last active Sep 6, 2017
make portainer accessible using domain(in our case portainer.test.dev)
View readme.md
reverseProxyPortainer
├── portainer
│   └── docker-compose.yml
└── reverseProxy
    ├── docker-compose.yml
    └── vhost.d
        └── portainer.test.dev
View gist:be76884c517084f005ef1e8ba7cda44e
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 Sep 24, 2017
install zprezto on ubuntu
View install_zprezto.sh
#!/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
View .zpreztorc
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
@souhaiebtar
souhaiebtar / .vimrc
Last active Sep 25, 2017
my vim config file
View .vimrc
" 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 Sep 25, 2017
my zshrc file with prezto sourcing and powerlevel9 config
View .zshrc
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 Oct 25, 2017
install zsh git, than install zprezto and configure it, and change them to powerlevel9k, done on ubuntu
View installzprezto.sh
#!/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 Mar 25, 2018
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
View applescript: fix tap to click on osx sierra
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
View html: Image Optimization
<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 Jul 11, 2018
#arduino #esp8266 #wemosd1
View i2cdisplay_ wemos.ino
#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()
{
You can’t perform that action at this time.