Skip to content

Instantly share code, notes, and snippets.

View JiveOff's full-sized avatar

Antoine JiveOff

View GitHub Profile
@JiveOff
JiveOff / script.gs
Last active July 15, 2024 21:29
Google Script (Sondage popularité)
var ElementTranslation = {
Water: "Hydro",
Fire: "Pyro",
Electric: "Electro",
Grass: "Dendro",
Ice: "Cryo",
Rock: "Geo",
Wind: "Anemo",
};
@JiveOff
JiveOff / chatplex.ts
Created July 1, 2024 19:40
ChatPlex LLS TS Client
import { appConfig } from "../config/app";
import axios from "./axios";
import { logger } from "./consola";
type ChatPlexMethods = "Account_AuthByEmailPassword" | "LLS_GetMyInfos" | "LLS_CreateChannel" | "LLS_RenewChannel" | "LLS_DeleteChannel" | "LLS_GetChannelInfo";
type ChatPlexMethodMapping = {
Account_AuthByEmailPassword: {
params: {
Email: string;
@JiveOff
JiveOff / index.ts
Last active May 21, 2024 08:22
Newtype for TypeBox
import { Type, type StaticDecode, type TNumber } from "@sinclair/typebox";
import { TypeBoxNewtype } from "./newtype";
const usdType = TypeBoxNewtype<{ readonly USD: unique symbol }, TNumber>(
Type.Number()
);
const eurType = TypeBoxNewtype<{ readonly EUR: unique symbol }, TNumber>(
Type.Number()
);
@JiveOff
JiveOff / gitlab-ci.yml
Created March 30, 2024 15:51
Classic GitLab CI for Terraform deployments
stages:
- validate
- plan
- apply
- destroy
variables:
TF_VAR_tf_state_bucket: "devops-tf-s3"
TF_VAR_region: "us-east-1"
TF_VAR_key: "devops-infra-ci"

Yubikey GPG inside WSL2

  1. Install GPG4Win.
  2. Start up Kleopatra (a UI tool from 1) and make sure your YubiKey is loaded there.
    • You can also add GPG4Win to Startup folder using a link with this Target:
      "C:\Program Files (x86)\GnuPG\bin\gpg-connect-agent.exe" /bye
      
      This will only load the agent at Startup, and you won't be bothered by any UI or tray agent.
  3. Download wsl2-ssh-pageant into your Windows %userprofile%/.ssh directory (Windows dir is important for performance).
@JiveOff
JiveOff / HasTableParams.ts
Created March 2, 2023 21:14
Table Query Params decorator for Fastify
import { FastifyRequest } from "fastify"
export function HasTableParams() {
return function (
target: object,
propertyKey: string | symbol,
descriptor: PropertyDescriptor
) {
const originalMethod = descriptor.value
@JiveOff
JiveOff / keybase.md
Created December 22, 2022 14:37
keybase.md

Keybase proof

I hereby claim:

  • I am jiveoff on github.
  • I am jiveoff (https://keybase.io/jiveoff) on keybase.
  • I have a public key ASBhPBDcFh9Psy_790W2yRW_rybN9cgR-FLw_2jdvMC2nwo

To claim this, I am signing this object: