mkdir toto && cd toto
az storage blob download-batch --account-name account_name --account-key account_key --source bucket_name --destination . --pattern "*"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use client"; | |
import * as React from "react"; | |
import { ChevronLeft, ChevronRight } from "lucide-react"; | |
import { DayPicker } from "react-day-picker"; | |
import { format } from "date-fns"; | |
import { cn } from "~/lib/utils"; | |
import { buttonVariants } from "~/components/ui/button"; | |
import { fr } from "date-fns/locale"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -i | |
mdutil -Ea | |
mdutil -ai off | |
mdutil -ai on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Désactive toutes les restrictions de copier-coller | |
document.addEventListener('copy', function(e) { | |
e.stopPropagation(); | |
}, true); | |
document.addEventListener('paste', function(e) { | |
e.stopPropagation(); | |
}, true); | |
document.addEventListener('cut', function(e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export enum EventType { | |
SEND_RESULT_EVENT = "sendResultEvent", | |
SEND_RANDOM_ITEM = "sendRandomItem", | |
} | |
export type CallbackEventType = { | |
[EventType.SEND_RESULT_EVENT]: (isEligible: boolean) => void; | |
[EventType.SEND_RANDOM_ITEM]: (valueA: string, valueB: number) => void; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ZSH="/Users/max/.oh-my-zsh" | |
ZSH_THEME="robbyrussell" | |
plugins=(git | |
zsh-autosuggestions | |
zsh-syntax-highlighting | |
) | |
source $ZSH/oh-my-zsh.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type CamelCase<S extends string> = | |
S extends `${infer P1}_${infer P2}${infer P3}` | |
? `${Lowercase<P1>}${Uppercase<P2>}${CamelCase<P3>}` | |
: Lowercase<S>; | |
export type KeysToCamelCase<T> = { | |
[K in keyof T as CamelCase<string & K>]: T[K] extends {} | |
? KeysToCamelCase<T[K]> | |
: T[K]; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getValue = <TObj, Tkey extends keyof TObj> (obj: TObj, key: Tkey) => obj[key] | |
const result = getValue({a: "hello", b: 2, c: true}, "a") | |
console.log(result) // defined as string | |
const result2 = getValue({a: "hello", b: 2, c: true}, "b") | |
console.log(result2) // defined as number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { forwardRef } from "react"; | |
// Declare a type that works with | |
// generic components | |
type FixedForwardRef = <T, P = {}>( | |
render: (props: P, ref: React.Ref<T>) => React.ReactNode | |
) => (props: P & React.RefAttributes<T>) => React.ReactNode; | |
// Cast the old forwardRef to the new one | |
export const fixedForwardRef = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Vehicule = "Voiture" | "Camion"; | |
class Voiture { | |
public taille = "2m" | |
constructor() { | |
console.log("Je suis une voiture"); | |
} | |
} | |
class Camion { |
NewerOlder