- Create a new bookmark
- To the link add
data:text/html,
- After
data:text/html,
paste block below - Save bookmark, and open it
First time it may take a while to load the library
import glob from 'fast-glob' | |
import { build } from 'esbuild' | |
import { Project } from 'ts-morph' | |
const project = new Project({ | |
compilerOptions: { | |
outDir: 'dist', | |
emitDeclarationOnly: true, | |
}, | |
tsConfigFilePath: './tsconfig.json', |
// Regular expression patterns for testing content-type response headers. | |
var RE_CONTENT_TYPE_JSON = new RegExp( "^application/(x-)?json", "i" ); | |
var RE_CONTENT_TYPE_TEXT = new RegExp( "^text/", "i" ); | |
// Static strings. | |
var UNEXPECTED_ERROR_MESSAGE = "An unexpected error occurred while processing your request."; | |
export class ApiClient { | |
/** | |
* I initialize the API client. |
import { useLoaderData, Link, useSearchParams } from 'remix'; | |
import { parseISO, format } from 'date-fns'; | |
import groupBy from 'lodash/groupBy'; | |
let PAGE_SIZE = 5; | |
function safeParseInt(str) { | |
let parsed = parseInt(str); | |
return isNaN(parsed) ? 0 : parsed; | |
} |
import type { Stripe } from 'stripe' | |
export type StripeWebhookEventTypes = | |
Stripe.WebhookEndpointCreateParams.EnabledEvent | |
export type StripeWebhookEvent< | |
EventType extends StripeWebhookEventTypes, | |
Payload | |
> = { | |
eventType: EventType |
<template> | |
<fieldset class="date-input" :data-qa-id="id"> | |
<legend>{{ legend }}</legend> | |
<component | |
@change="onChange($event)" | |
:is="component" | |
:custom-validity="customValidity" | |
v-bind="$props" | |
/> | |
</fieldset> |
const AWS = require("aws-sdk"); | |
const fetch = require("node-fetch"); | |
const crypto = require("crypto"); | |
const slackChannel = process.env.SLACK_CHANNEL_URL; | |
const githubSecret = process.env.WEBHOOK_SECRET; | |
const verifyGitHubSignature = (req = {}, secret = "") => { | |
const sig = req.headers["X-Hub-Signature"]; | |
const hmac = crypto.createHmac("sha1", secret); | |
const digest = Buffer.from( |
import os | |
import pickle | |
import warnings | |
import numpy as np | |
import pandas as pd | |
from sklearn.model_selection import train_test_split | |
from tensorflow.keras.callbacks import EarlyStopping | |
from tensorflow.keras.layers import Dense | |
from tensorflow.keras.layers import Dropout |
Thoughts on standardizing REST with machines
":" //#;exec /usr/bin/env node --input-type=module - $@<$0 | |
import process from 'process' | |
const { argv } = process | |
console.log(argv) |