Skip to content

Instantly share code, notes, and snippets.

View garronej's full-sized avatar
🧢
Bluehat

Joseph Garrone garronej

🧢
Bluehat
View GitHub Profile

In a real Keycloak environment, clicking this link would redirect you to the next step in the authentication process.
However, in this instance, you are using a mock object of the Keycloak FreeMarker context for development purposes.

Changing the language directly within Storybook is not supported.
To preview your component in different languages, create separate stories for each language.
Example:

export const Default: Story = {
    render: () => <KcPageStory />
};

export const French: Story = {
import { Evt } from "evt";
import { DongleController as Dc } from "chan-dongle-extended-client";
import { Ami, agi } from "ts-ami";
//import * as dcMisc from "chan-dongle-extended-client/dist/lib/misc";
import { phoneNumber } from "phone-number";
import * as types from "./types";
import * as dbSemasim from "./dbSemasim";
import * as messageDispatcher from "./messagesDispatcher";
import * as sip from "ts-sip";
import { logger } from "../tools/logger";
@garronej
garronej / .env.local
Last active March 18, 2021 21:29
onyxia-ui environnement variables
REACT_APP_WARNING_MESSAGE="**Vendredi 29 janvier**, session kubernetes pour le statisticien sur zoom. Plus d info sur [le canal tchap](https://www.tchap.gouv.fr/#/room/#SSPCloudXDpAw6v:agent.finances.tchap.gouv.fr)"
REACT_APP_INFO_MESSAGE="**NOUVEAU** Interface de gestion des variables d'environnement. Découvrez la page [Mes Secrets](/mes-secrets) 🚀"
REACT_APP_BASE_API_URL=https://onyxia-preview.lab.sspcloud.fr/api
REACT_APP_SERVICES_URL=https://innovation.pages.lab.sspcloud.fr/plateforme-onyxia/services-ressources/services.json
REACT_APP_TRAININGS_URL=https://innovation.pages.lab.sspcloud.fr/plateforme-onyxia/services-ressources/formations.json
REACT_APP_MONITORING_BASE_URI="https://grafana.lab.sspcloud.fr/d/mZUaipcmk/app-generique?orgId=1&var-id="
# MINIO
REACT_APP_MINIO_BASE_URI=https://minio.lab.sspcloud.fr
@garronej
garronej / safe_typescript_type_casting.ts
Last active June 27, 2020 16:05
How to do safe type casting with TypeScript
type Shape = Shape.Circle | Shape.Square;
namespace Shape {
export type Circle = {
type: "CIRCLE";
radius: number;
};
export type Square = {
@garronej
garronej / visa_booking_watcher.ts
Last active June 5, 2020 18:08
A script that watches when visa registration are open. Set up for www.herault.gouv.fr/booking but can be adapted.
/*
* Prerequisite:
* You will need a supported Huawei 3G dongle:
* https://github.com/bg111/asterisk-chan-dongle/wiki/Requirements-and-Limitations
*
* You also have to install chan-dongle-extended.
* https://garronej.github.io/chan-dongle-extended-pages/
* This tool of mine enable to send SMS via a CLI.
*
* You then need to run this script on something like a raspberry pi
            const typeGuard_= <U extends T, T>(o: T): o is U => true;

            const o: number =33;

            assert(typeGuard_<33, typeof o>(o));

            o; //<= o is 33

            //It would be nice to be able to do:
@garronej
garronej / offer_trackpoint_buttons.md
Last active November 28, 2019 09:07
Offer to fix ClickPad (Left,Middle,Right) physical buttons.

Hi there,

I will happyly paypal 30$ to anyone who would log in to my machine and got the ClickPad (Left,Middle,Right) physical buttons to work.

I have a Thinkpad Yoga S1 for wich I have swiped the trackpoint by the one of the X250 image I have tried the kext ( in EFI partition ) provided by @Sniki without success. ( The phisical buttons aren't working ). I haven't try with SSDT-Thinkpad_Clickpad.dsl thought.

If someone got it to work for me I will report here.

@garronej
garronej / dummy_display_patch.app
Last active September 1, 2021 00:27
Fix intel hd graphics, image become messy half way during the boot screen with apple logo.
#!/bin/bash
cscreen -d 32 -x 1600 -y 900 -r 60
sleep 1
cscreen -d 32 -x 1920 -y 1080
Hi,
We are going to require large quantity of 3G modem and we
are looking for establishing a trust relationship with a single supplier.
Our hard requirements are:
-Modems must implement standard Huawei AT command interface.
-It must be possible to place voice calls and send SMSs.
-Modems should be unlocked.