Skip to content

Instantly share code, notes, and snippets.

@sertraline
sertraline / iso3166.tsx
Last active December 4, 2024 06:26
Typescript alpha2 + alpha3 country codes and phone codes ISO 3166
interface Alpha3Country {
a2_code: string
a3_code: string
label: string
phone: string
}
const Countries: Alpha3Country[] = [
{
label: 'Andorra',
@sertraline
sertraline / tax_id.tsx
Created December 5, 2024 13:42
Typescript European VAT IDs + imaskjs masks and country codes
export interface TaxRecord {
alpha2_code: string
mask: string
desc: string
example: string
}
export const TaxIdentifiers: TaxRecord[] = [
{
alpha2_code: 'AT',
@sertraline
sertraline / chart.js
Created January 27, 2025 19:54
chartjs doughnut with labels outside
// setup
const data = {
labels: [
'Improved Screening (15%)',
'Reduced Dependence (20%)',
'Efficient Decisions (15%)',
'Proactive Prevention (30%)',
'Other (Remaining Savings)',
],
datasets: [