Skip to content

Instantly share code, notes, and snippets.

View anefzaoui's full-sized avatar

Ahmed Nefzaoui anefzaoui

  • ITQAN
  • Tunisia
View GitHub Profile
// 1- les appels des modules/packages/librairies
const express = require('express');
const mysql = require('mysql');
const app = express();
const path = require('path');
var hbs = require('express-hbs');
var port = 3000;
// 2- configuration
@anefzaoui
anefzaoui / bugzilla_installation_ubuntu.sh
Last active July 17, 2023 13:15
Automatically (automagically) install Bugzilla on Ubuntu
#!/bin/bash
# Update package list and upgrade packages
sudo apt-get update && sudo apt-get upgrade -y
# Install required packages
sudo apt-get install -y debconf-utils perl build-essential libssl-dev libexpat1-dev libmysqlclient-dev libgd-dev libxml2-dev libxslt1-dev libnet-ldap-perl libdbi-perl libdbd-mysql-perl git nano libcgi-pm-perl libdigest-sha-perl libtimedate-perl libdatetime-perl libdatetime-timezone-perl libdbix-connector-perl libtemplate-perl libemail-address-perl libemail-sender-perl libemail-mime-perl liburi-perl liblist-moreutils-perl libmath-random-isaac-perl libjson-xs-perl libgd-perl libchart-perl libtemplate-plugin-gd-perl libgd-text-perl libgd-graph-perl libmime-tools-perl libwww-perl libxml-twig-perl libauthen-sasl-perl libnet-smtp-ssl-perl libauthen-radius-perl libsoap-lite-perl libxmlrpc-lite-perl libjson-rpc-perl libtest-taint-perl libhtml-parser-perl libhtml-scrubber-perl libencode-perl libencode-detect-perl libemail-reply-perl libhtml-formattext-withlinks-perl libtheschwartz-perl li
@anefzaoui
anefzaoui / add_volume.sh
Created January 20, 2019 20:15
Adding an external volume to an existing running Docker container. Props go to https://jpetazzo.github.io/2015/01/13/docker-mount-dynamic-volumes/
#!/bin/sh
set -e
CONTAINER=container_name
HOSTPATH=/home/username/external/location
CONTPATH=/internal/docker/container
REALPATH=$(readlink --canonicalize $HOSTPATH)
FILESYS=$(df -P $REALPATH | tail -n 1 | awk '{print $6}')
while read DEV MOUNT JUNK
@anefzaoui
anefzaoui / Lazy in exam.
Last active August 29, 2015 14:13
Être lazy dans un examen.
function getXhr(){
var xhr;
try{
xhr = new XMLHttpRequest();
} catch (e){
alert("Vous utilisez le pire navigateur, Internet Explorer, veuillez switcher vers un autre.");
return false;
}
return xhr;
}