Skip to content

Instantly share code, notes, and snippets.

Please enter a MongoDB connection string (Default: mongodb://localhost/):
Current Mongosh Log ID: 6639e4bc72218249cf12686a
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.8.1
Using MongoDB: 7.0.9
Using Mongosh: 1.8.1
hospital> db.patients.insertMany([ { "name": "kouame", "age": 27, "history": [{ disease: "cold" }] }, { "name": "yao", "age": 24, "history": [{ disease: "headach" }] }, { "name": "jean", "age": 45, "history": [{ disease: "cold" }] }])
{
@kouameYao
kouameYao / countries-arr-.md
Last active May 17, 2024 14:50
Pays du monde
[
  {"code": "AFG", "pays": "Afghanistan"},
  {"code": "ALB", "pays": "Albanie"},
  {"code": "DZA", "pays": "Algérie"},
  {"code": "AND", "pays": "Andorre"},
  {"code": "AGO", "pays": "Angola"},
  {"code": "ATG", "pays": "Antigua-et-Barbuda"},
  {"code": "ARG", "pays": "Argentine"},
@kouameYao
kouameYao / enum.to.array.md
Last active May 31, 2024 17:28
explore-more
export function enumToKeyValueArray<E extends Record<string, string | number>>(
  enumObj: E
): KeyValueEntry<keyof E, E[keyof E]>[] {
  return Object.entries(enumObj).map(([key, value]) => ({
    value: key as keyof E,
    label: value as E[keyof E],
  }));
}
@kouameYao
kouameYao / not-found.tsx
Created July 23, 2024 17:03
Nextjs project not-found file
import Link from 'next/link';
import Image from 'next/image';
import { Title } from '@/components/ui/text';
import { Button } from '@/components/ui/button';
import { PiHouseLineBold } from 'react-icons/pi';
import SocialItems from '@/components/ui/social-shares';
import NotFoundImg from '@public/not-found.png';
export default function NotFound() {
@kouameYao
kouameYao / exo-1.html
Last active July 29, 2024 08:06
formation avec M. Ello
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Meilleurs Services Informatiques - Tech Solutions</title>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap"
/>
@kouameYao
kouameYao / user-fer.md
Last active August 9, 2024 04:51
Fer assets

Demande d'achat

[
    {
        "email": "[email protected]" # Création de demande
        "approval_level": 0
    },
    {
@kouameYao
kouameYao / email.html
Created August 1, 2024 15:33
Ask for help
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Newsletter</title>
<style>
* {
padding: 0;
margin: 0;
export const getAdminTransactions = async (
    paginationArg: TPaginationArgs = { limit: 10, page: 1 },
    filters?: Record<string, any>,
): Promise<TGetListTransactions> => {
    const { limit, page } = paginationArg;
    const filtersToStr = getFilterPath(filters);

 try {
export const TRANSACS = [
  {
    id: "018bf608-e008-4015-b13f-95f823f45ecb",
    merchantId: "a8796e61-5fea-4775-8956-5aa4d1eeb6be",
    merchantName: "ASERNUM",
    number: "+2250777404136",
    service_name: "FACTURATION API RNPP",
    customer_firstname: "Destinataire",
<div class="grid sm:grid-cols-2 md:grid-cols-4">
<picture>
<source
srcset="./images/mobile/image-gallery-milkbottles.jpg"
media="(max-width: 767px)"
/>
<source
srcset="./images/desktop/image-gallery-milkbottles.jpg"
media="(min-width: 768px)"
/>