Skip to content

Instantly share code, notes, and snippets.

View mairh's full-sized avatar
🎯
Focusing

Ujjwal Mairh mairh

🎯
Focusing
  • Helsinki
View GitHub Profile
@mairh
mairh / easymedi-hmac-generation.ts
Created February 12, 2024 14:29
EM3.Example of creating HMAC
const secretKey: string = "xxxxx";
const kela: string = "0123";
const timestamp: number = new Date().getTime();
const cryptoHmac: string = crypto.createHmac('sha256', secretKey).update(`${kela}:${timestamp}`).digest('hex');
@mairh
mairh / easymedi-api-request.ts
Last active February 12, 2024 14:29
EM3. Example of API request
// We received HMAC and timestamp earlier, see example https://gist.github.com/mairh/14e260082abc13d7e20fff0587a622ab
// Route: GET /orders
const searchParams = new URLSearchParams({
page: "1", // page number for fetch
signature: cryptoHmac,
});
const headers = new Headers({ "fetch-time": String(timestamp) });
@mairh
mairh / hmac
Created February 12, 2024 13:53
PD3.Example of creating HMAC
const secretKey: string = "xxxxx";
const kela: string = "0123";
const timestamp: number = new Date().getTime();
const cryptoHmac: string = crypto.createHmac('sha256', secretKey).update(`${kela}:${timestamp}`).digest('hex');
@mairh
mairh / cloudSettings
Created September 20, 2019 12:24
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-09-20T12:24:38.655Z","extensionVersion":"v3.4.2"}
@mairh
mairh / VS Code cloud settings
Last active August 22, 2019 12:53
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-08-22T12:51:59.987Z","extensionVersion":"v3.4.2"}
syksikkö","__typename":"CustomerFilter"},{"id":3363,"name":"Mainiokoti","__typename":"CustomerFilter"},{"id":3364,"name":"Yläpiha","__typename":"CustomerFilter"},{"id":3365,"name":"Lehmuskoti","__typename":"CustomerFilter"},{"id":3366,"name":"Kotisairaanhoito","__typename":"CustomerFilter"},{"id":3367,"name":"Linnan Klinikka","__typename":"CustomerFilter"},{"id":3368,"name":"Validia ","__typename":"CustomerFilter"},{"id":3369,"name":"Pihapirtti","__typename":"CustomerFilter"},{"id":3370,"name":"Hoivapirtti","__typename":"CustomerFilter"},{"id":3371,"name":"Harjupirtti","__typename":"CustomerFilter"},{"id":3372,"name":"Validia / Lintula","__typename":"CustomerFilter"},{"id":3373,"name":"Sepän kodit","__typename":"CustomerFilter"},{"id":3374,"name":"Mäntykoti (Kuopion kaupunki)","__typename":"CustomerFilter"},{"id":3375,"name":"Niirala/Haapaniemi (Kuopion kaupungin kotihoito)","__typename":"CustomerFilter"},{"id":3376,"name":"Puijonlaakso (Kuopion kaupungin kotihoito)","__typename":"CustomerFilter"},{"id":3377,
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
YARN_PRODUCTION=false
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=false
-----> Installing binaries
engines.node (package.json): >= 6.11.1 < 10
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
YARN_PRODUCTION=false
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=false
-----> Installing binaries
engines.node (package.json): >= 6.11.1 < 10
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
YARN_PRODUCTION=false
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=false
-----> Installing binaries
engines.node (package.json): >= 6.11.1 < 10
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
YARN_PRODUCTION=false
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=false
-----> Installing binaries
engines.node (package.json): >= 6.11.1 < 10