Skip to content

Instantly share code, notes, and snippets.

@brahimmachkouri
brahimmachkouri / install_portainer.sh
Last active May 30, 2025 19:07
Ubuntu : install Portainer
#!/usr/bin/env bash
set -euo pipefail
cleanup() { [[ -n "${SUDO_LOOP_PID:-}" ]] && kill "$SUDO_LOOP_PID"; }
trap cleanup EXIT
command -v sudo >/dev/null || { echo "❌ sudo manquant"; exit 1; }
sudo -v
( while true; do sudo -n true; sleep 60; done ) & SUDO_LOOP_PID=$!
@brahimmachkouri
brahimmachkouri / install_docker.sh
Last active May 30, 2025 18:51
Ubuntu : Install Docker
#!/usr/bin/env bash
set -euo pipefail
# ---------- Fonctions ----------
cleanup() { [[ -n "${SUDO_LOOP_PID:-}" ]] && kill "$SUDO_LOOP_PID"; }
trap cleanup EXIT
need_cmd() { command -v "$1" &>/dev/null || { echo "❌ $1 introuvable"; exit 1; }; }
need_cmd sudo
@brahimmachkouri
brahimmachkouri / oci8_install.sh
Last active June 16, 2025 04:26
Ubuntu : installation de oci8
#!/bin/bash
# BM 20240830
# Testé avec Ubuntu 22.04, PHP 8.3 (Ondrej Sury) & Oracle Instant Client 21.15
# Vérification que le script est exécuté en tant qu'administrateur (root)
if [[ $EUID -ne 0 ]]; then
echo "Ce script doit être exécuté en tant qu'administrateur (root)."
exit 1
fi
@CharlesGodwin
CharlesGodwin / cloudflare.md
Last active June 1, 2025 14:13
I Don't Need Port Forwarding and Don't Care About CGNAT

I Don't Need Port Forwarding and Don't Care About CGNAT

This was rewritten 2022-11-30

This article is for users that want all these features:

  • To connect to home network from anywhere
  • Can connect without any port forwarding; either by choice or internet provider can't or won't provide access
  • No setup or configuration or installation on client machine
  • No enrolment / registration required
@rain-1
rain-1 / Raspberry Pi, Static HTTPS site with Docker and Nginx.md
Last active May 14, 2025 21:22
Raspberry Pi, Static HTTPS site with Docker and Nginx

Raspberry Pi, Static HTTPS site with Docker and Nginx

This tutorial is dated Oct 2021, if it's much further on than that this information might be out of date.

This is a guide on setting up a static HTTPS website on your raspberry pi using docker and nginx. The aim is to have this running on the raspberry pi and to be able to access it from a host computer on the same local network. You should already be able to ssh into your pi from your host computer and have raspberry pi OS set up.

Find your raspberry pi

# Source: https://gist.github.com/d2f36b05bf959e5fc91497ea3f0dceb3
#######################################################
# Free Docker Desktop Alternative For Mac And Windows #
# https://youtu.be/LGNEG-t96eE #
#######################################################
# Referenced videos:
# - How to run local multi-node Kubernetes clusters using kind: https://youtu.be/C0v5gJSWuSo
# - K3d - How to run Kubernetes cluster locally using Rancher k3s: https://youtu.be/mCesuGk-Fks
@johndatserakis
johndatserakis / install-imagick-docker-php-7-1-alpine.md
Last active August 5, 2024 06:22
Install imagick In Docker FROM php:7.1-fpm-alpine

docker-library/php#105

RUN set -ex \
    && apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS imagemagick-dev libtool \
    && export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \
    && pecl install imagick-3.4.3 \
    && docker-php-ext-enable imagick \
    && apk add --no-cache --virtual .imagick-runtime-deps imagemagick \
 && apk del .phpize-deps
@allenyllee
allenyllee / install_tools.sh
Last active July 2, 2025 18:42
mount vhdx in linux
#!/bin/bash
# install qemu utils
sudo apt install qemu-utils
# install nbd client
sudo apt install nbd-client
#!/bin/bash
################################
# OS X Install ISO Creater #
# #
# Author: shela #
################################
#######################################
# Declarations
@rkueny
rkueny / snx_install.sh
Created July 21, 2016 08:33
Checkpoint SNX VPN client installation shell script
mkdir temp && cd temp
# for linux 'amd64' architecture install those packages:
sudo apt-get install libx11-6:i386 libpam0g:i386 libstdc++5:i386 lib32z1 lib32ncurses5 lib32bz2-1.0
wget https://vpnportal.aktifbank.com.tr/SNX/INSTALL/snx_install.sh
sudo ./snx_install.sh
cd .. && rm -rf temp/