Skip to content

Instantly share code, notes, and snippets.

View mohamed-el-habib's full-sized avatar

Mohamed EL Habib mohamed-el-habib

  • Publicis Sapient France
  • Paris, France
View GitHub Profile
@mohamed-el-habib
mohamed-el-habib / gist:00deef599e8ba1cdbece
Last active September 6, 2016 10:11 — forked from abs/gist:c0d598996870dda719b3
Downloads and installs the startssl CA certs into the global Java keystore
#!/bin/bash
# Downloads and installs the startssl CA certs into the global Java keystore
# https://sipb.mit.edu/doc/safe-shell/
set -euf -o pipefail
# Check if JAVA_HOME is set
if [ "$JAVA_HOME" = "" ]
then
echo "ERROR: JAVA_HOME must be set."
exit 1
@mohamed-el-habib
mohamed-el-habib / add-local-admin-user.sh
Last active February 13, 2017 05:55
swarm in rancher using 3 docker-machine
#!/bin/bash
set -x
set -e errexit
set -o pipefail
username="admin-$(echo $RANDOM % 1000 + 1 | bc)"
password="$(uuidgen)" # change it
rancherServerId=$(docker-machine ip host1)
rancherServerPort="8080"
@mohamed-el-habib
mohamed-el-habib / 00_ReadMe.md
Last active April 10, 2020 10:21
drupal fpm with nginx and mysql

Usage

git clone git://github.com/fd57d8aa59b1574ee7728edf128814d3.git docker-drupal-fpm
cd docker-drupal-fpm
mkdir -p /usr/local/share/dockervolumes/drupal # if you change this folder please update the run.sh

chmod +x run.sh && ./run.sh up

@mohamed-el-habib
mohamed-el-habib / clean.docker.registry.sh
Created March 11, 2017 07:23
bash script to delete images from docker registry using search keyword
#!/bin/bash
#
# usage ./clean.docker.registry.sh registryUrl login filterString
#
# read the password
echo -n Password:
read -s password
user="$2:${password}"