Skip to content

Instantly share code, notes, and snippets.

View SalathielGenese's full-sized avatar
🇫🇷
WIP https://github.com/SalathielGenese/resp

Salathiel Genese SalathielGenese

🇫🇷
WIP https://github.com/SalathielGenese/resp
View GitHub Profile
@SalathielGenese
SalathielGenese / i18n.service.ts
Created June 22, 2023 16:40
Override Angular's ApplicationRef.isStable
import {ApplicationRef, DestroyRef, Injectable} from "@angular/core";
import {SanityClient} from "@sanity/client";
import {BehaviorSubject, debounceTime, filter, map, mergeMap, Observable, of, ReplaySubject, skip, tap} from "rxjs";
import {LocaleService} from "./locale.service";
import {takeUntilDestroyed} from "@angular/core/rxjs-interop";
import {fromPromise} from "rxjs/internal/observable/innerFrom";
@Injectable()
export class I18nService {
readonly #keys$ = new BehaviorSubject([] as string[]);
@SalathielGenese
SalathielGenese / api.orange.cm.sms.index.js
Last active August 13, 2019 15:49
Use Orange API for SMS in Cameroun
const { default: axios } = require( 'axios' );
/**
*
* Send SMS
*
* @param {string} source The phone number sending the SMS, in the format '237698765432' (no '+' nor '00' prefix nor white spaces)
* @param {string} target The phone number to receive the SMS, in the format '237698765432' (no '+' nor '00' prefix nor white spaces)
import { data } from './data.js';
alert( data.message );
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>TypeScript for the web</title>
</head>
<body>
<script type="module" src="./index.js"></script>
import { data } from './data';
alert(data.message);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var data_1 = require("data");
alert(data_1.data.message);
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>TypeScript for the web</title>
</head>
<body>
<script src="./index.js"></script>
export const data = {
message: 'Hello world',
};
import { data } from './data';
alert( data.message );
{
"compilerOptions": {
"target": "es2015",
"module": "es2015",
}
}