Skip to content

Instantly share code, notes, and snippets.

View muhamedoufi's full-sized avatar
🤩

Muhamedou Fi muhamedoufi

🤩
View GitHub Profile
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"zf2"
],
"homepage": "http://framework.zend.com/",
"require": {
{
"headers": [
{
"name": "ou",
"column": "Organisation unit",
"valueType": "TEXT",
"type": "java.lang.String",
"hidden": false,
"meta": true
},
@muhamedoufi
muhamedoufi / models_accounts.py
Created June 7, 2023 08:55
multimedia models
# L'application accounts
# from sqlite3 import IntegrityError
import email
from PIL import Image
from django.db import models
# from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
import datetime
ser = get_user_model()
class SignupForm(UserCreationForm):
password1 = forms.CharField(widget=forms.HiddenInput(attrs={'value':'po123456'}))
password2 = forms.CharField(widget=forms.HiddenInput(attrs={'value':'po123456'}))
# None # Standard django password input
# password2 = None # Standard django password confirmation input
password = forms.CharField(
widget=forms.HiddenInput(attrs={'value': 'po123456'}), # Set the default password
)
@muhamedoufi
muhamedoufi / osrm_docker_windows.md
Created March 29, 2023 09:43 — forked from AlexandraKapp/osrm_docker_windows.md
How to set up your own OSRM backend with Docker on Windows

How to set up your own OSRM backend with Docker on Windows

The OSRM docker quick start provides a great explanation on how to set up the container: https://hub.docker.com/r/osrm/osrm-backend/

Yet - for Docker on Windows minor changes were necessary for me (otherwise I'd get "File not found" or "Permission" errors).

This is how it worked for me:

1. Pull the image

@muhamedoufi
muhamedoufi / CheesePizza.java
Created February 3, 2023 17:17
Pizza Creation Using Factory Method
class CheesePizza implements Pizza {
@Override
public void prepare() {
System.out.println("Préparation de la pizza au fromage");
}
@Override
public void bake() {
System.out.println("Cuisson de la pizza au fromage");
class CheesePizza implements Pizza {
@Override
public void prepare() {
System.out.println("Préparation de la pizza au fromage");
}
@Override
public void bake() {
System.out.println("Cuisson de la pizza au fromage");
}
@muhamedoufi
muhamedoufi / Pizza.java
Created February 3, 2023 17:09
Pizza cration using Factory Method
interface Pizza {
void prepare();
void bake();
void cut();
}
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
TouchableOpacity,
StatusBar,
Image,
} from 'react-native';
import * as Animatable from 'react-native-animatable';