Skip to content

Instantly share code, notes, and snippets.

View AliKhadivi's full-sized avatar
👨‍💻
Learning....

Ali Khadivi AliKhadivi

👨‍💻
Learning....
View GitHub Profile

Install and config cgroup with cgroupfs in Ubuntu

Install

Install required packages

apt update && apt install cgroup-tools cgroup-lite libcgroup1  cgroupfs-mount

Configure

copy cgred.conf from examples

Wordpress & Mysql & PhpMyAdmin with Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called docker-compose.yaml and run the command

For run

$ docker-compose up -d

For stop and remove containers & remove network

$ docker-compose down

@AliKhadivi
AliKhadivi / .bashrc
Created September 19, 2021 04:30
Enable bash autocomplate! before run ( sudo apt-get install --reinstall bash-completion )
# enable bash completion in interactive shells
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
PROMPT=$'
%{$FG[129]%}(%{$fg_bold[blue]%}%n %{$FG[129]%}@ %{$fg_bold[blue]%}%m%{$FG[129]%}) %{$fg_bold[green]%}%D{[%H:%M:%S]} %{$reset_color%}%{$fg_bold[cyan]%}[%~]%{$reset_color%} $(git_prompt_info) $(kube_ps1) $(git_prompt_status)\
%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$FG[018]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="✍ "
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}(%{%G✚%} )"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%}(%{%G✹%} )"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}(%{%G✖%} )"
#!/bin/bash
echo "___________________________________________"
echo "| Welcome to Jalgo Get free ssl Script (-: |"
echo "| POWERED BY JALGO.IR(Ali Khadivi) |"
echo "| Version: 1.0.0 |"
echo "|__________________________________________|"
echo ""
echo ""
echo " Lets GO ->"
echo ""
#!/bin/bash
# ----------------------------------
# Colors
# ----------------------------------
NC='\033[0m'
RED='\033[0;31m'
GREEN='\033[0;32m'
ORANGE='\033[0;33m'
BLUE='\033[0;34m'
@AliKhadivi
AliKhadivi / kubernetes-dashboard.md
Last active August 27, 2022 09:20
Kubernetes dashboard deploy

Kubernetes dashboard deploy

Install dashboard:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/deploy/recommended.yaml

Create Token:

kubectl -n kube-system create serviceaccount TOKEN-NAME
kubectl create clusterrolebinding TOKEN-NAME --clusterrole=cluster-admin --serviceaccount=kube-system:TOKEN-NAME
@AliKhadivi
AliKhadivi / electron-windows-builder.Dockerfile
Last active March 17, 2022 07:42 — forked from hackash/electron-windows-builder
Workaround for System.Exception at Squirrel.Utility.CreateZipFromDirectory on macOS Big Sur when building windows installer
FROM ubuntu:focal
WORKDIR ~
# Without interactive dialogue
ARG DEBIAN_FRONTEND=noninteractive
# Install required packages
RUN apt-get update \
&& apt-get install -y wget gnupg2 software-properties-common git apt-utils vim dirmngr apt-transport-https ca-certificates \
set number
set cursorline
" Plugins will be downloaded under the specified directory.
call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')
" Declare the list of plugins.
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
sudo apt update && sudo apt install -y zsh git curl wget vim fzf
sudo git clone https://github.com/ahmetb/kubectx /opt/kubectx
sudo ln -s /opt/kubectx/kubectx /usr/local/bin/kubectx
sudo ln -s /opt/kubectx/kubens /usr/local/bin/kubens
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
curl -L https://gist.githubusercontent.com/AliKhadivi/7a37c2ded63aaae904960663982431b2/raw/ > ~/.oh-my-zsh/custom/themes/jalgo.zsh-theme
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
curl -L https://gist.githubusercontent.com/AliKhadivi/5a23c205e927a6c9e85d27c95f0123ed/raw >> ~/.vimrc