Skip to content

Instantly share code, notes, and snippets.

Synthèse

1. OS

  • Faire l’interface entre:

    • les demandeurs (applications dites utilisateur) en ressources (espace memoire, fichiers, connexions reseaux, ...)
    • les ressources disponibles : processeurs, memoire, disques, carte reseau, ...
  • Gerer les offres et les demandes dans leur ensemble, pour arbitrer leur attribution:

  • dans l’espace (allocation)

@MichaelCurrin
MichaelCurrin / README.md
Last active March 26, 2024 15:29
VS Code snippets
@aneudysamparo
aneudysamparo / gist:30d0c4d7f82cd089753dcda56de040b0
Created August 24, 2020 16:43
NestJs authentication using JWT and private and public key
Since it's been days, I am guessing this was solved. I am just adding my two cents here for future readers.
The problem lies with the JwtModule and the JwtStrategy instantiation. They aren't configured properly.
You need to pass in the algorithms you'd use for signing and verifying the tokens, along with the keys.
To verify whether the tokens are actually getting generated with the RS256 algo, check the header in the token at https://jwt.io/.
It would probably show HS256, and since your code didn't use the correct algorithm to sign the token.
And it fails while token gets verified using the public key.
To generate signed tokens properly with the RSA key pair:
@MichaelCurrin
MichaelCurrin / vs_code_tasks.md
Last active February 6, 2022 19:31
VS Code tasks guide

Tasks

Guide for using tasks in VS Code

Tasks menu

How to open and use the tasks menu

Based on the Tasks tutorial.

Run any task

@tattali
tattali / react-context.md
Last active July 12, 2022 08:29
How to share data between components with react context

React Context as a store

TYPESCRIPT | useState

Context configuration

// src/services/context/StoreContext.tsx
import React, { createContext, Dispatch, PropsWithChildren, SetStateAction, useState } from "react";

export interface IStore {
  props1: string;
@lisawolderiksen
lisawolderiksen / git-co-authors.md
Created October 29, 2019 21:06
Add co-authors to Git commits

Adding co-authors to Git commits

How do you share credit for a new or altered piece of code when one person commits the change in a pair programming or mob programming session? And when you have questions about a particular change, how can you see in Git who has been working on that change, besides the committer? You add co-autors to your commits. This gist contains information on how to do that, so that the Git commit message contains a list of co-authors, and all co-autors for a commit are automatically listed in GitHubs web UI.

GitHub has some info on specifying co-authors here. This is good info, pretty straightforward. The gist of it (pun intended) is to include at least one blank line and then a line for each co-author like so Co-authored-by: name <name@example.com> at the very end of your commit message.

GitHub's recipe tells you [how to find the right e-mail address to use](https:

@MikeyBurkman
MikeyBurkman / tasks.json
Last active February 6, 2022 19:30
VS Code Typescript Build Task
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "tsc-watch",
"group": "build",
"command": "./node_modules/.bin/tsc",
"type": "shell",
@MikeyBurkman
MikeyBurkman / js-launch.json
Last active February 6, 2022 19:33
JS/Typescript Launch.json files
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Start",
"type": "node",
"request": "launch",
@blackcater
blackcater / diagrams.md
Created July 6, 2018 16:45
Markdown Diagrams

Diagrams

Markdown Preview Enhanced supports rendering flow charts, sequence diagrams, mermaid, PlantUML, WaveDrom, GraphViz, Vega & Vega-lite, Ditaa diagrams. You can also render TikZ, Python Matplotlib, Plotly and all sorts of other graphs and diagrams by using Code Chunk.

Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.

Flow Charts

This feature is powered by flowchart.js.