Skip to content

Instantly share code, notes, and snippets.

View TheMoroccan09's full-sized avatar
🎯
Focusing

Mohimi Othmane TheMoroccan09

🎯
Focusing
View GitHub Profile
@TheMoroccan09
TheMoroccan09 / launcher-docker-compose.sh
Last active November 28, 2017 11:02
To launch many docker-compose.yml file that each one is in a specific folder (docker >= v2)
#!/bin/bash
#TODO Delete proxy when user choise all
container_name="???"
red=`tput setaf 1`
cyan=`tput setaf 6`
reset=`tput sgr0`
CONTAINERS_FOLDER="$HOME/containers"
CHOICES=('shared' 'geocoding' 'jptrack' 'fm' 'kpi' 'gm')
alias good_night='shutdown -P 30'
alias docker_ip=fct_docker_ip
alias docker_pretty='docker ps --format "table {{.ID}}\t{{.Image}}\t{{.Ports}}\t{{.Names}}"'
alias docker_clear=fct_docker_clear
fct_docker_ip(){
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$1"
}
fct_docker_clear(){
server {
listen 80;
root /var/www/jpandco/jp_relay/public;
index index.php index.html index.htm;
# server_name local.relay.api;
location / {
sendfile off;
#!bin/bash
DOCKER_PIDS=$(docker ps -a -q)
if [ -n "$DOCKER_PIDS" ]; then
docker stop $DOCKER_PIDS && docker rm $DOCKER_PIDS
fi
[Desktop Entry]
Version=1.0
Type=Application
Name=PhpStorm
Icon=/home/themoroccan09/programs/phpstorm/bin/phpstorm.png
Exec="/home/themoroccan09/programs/phpstorm/bin/phpstorm.sh" %f
Comment=The Drive to Develop
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-phpstorm
@TheMoroccan09
TheMoroccan09 / haproxy.cfg
Created June 7, 2018 13:47 — forked from ryzy/haproxy.cfg
HAProxy conf with SSL termination and HTTP/2 support
global
#debug
chroot /var/lib/haproxy
user haproxy
group haproxy
pidfile /var/run/haproxy.pid
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
@TheMoroccan09
TheMoroccan09 / haproxy.cfg
Created June 7, 2018 13:47 — forked from ryzy/haproxy.cfg
HAProxy conf with SSL termination and HTTP/2 support
global
#debug
chroot /var/lib/haproxy
user haproxy
group haproxy
pidfile /var/run/haproxy.pid
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- JDBC Database connection settings -->
<property name="connection.driver_class">com.mysql.cj.jdbc.Driver</property>
@TheMoroccan09
TheMoroccan09 / README.md
Created June 18, 2020 19:30 — forked from dalezak/README.md
Ionic Capacitor Resources Generator
  1. Run npm install cordova-res --save-dev
  2. Create 1024x1024px icon at resources/icon.png
  3. Create 2732x2732px splash at resources/splash.png
  4. Add "resources": "cordova-res ios && cordova-res android && node scripts/resources.js" to scripts in package.json
  5. Copy resources.js file to scripts/resources.js
  6. Run sudo chmod -R 777 scripts/resources.js
  7. Run npm run resources