This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** biome-ignore-all lint/suspicious/noConsole: we are scripting */ | |
import { promises as fs } from "node:fs" | |
import path from "node:path" | |
import { fileURLToPath } from "node:url" | |
const __filename = fileURLToPath(import.meta.url) | |
const __dirname = path.dirname(__filename) | |
// we use the gobl repo as a submodule that we update through `git submodule update --remote --merge gobl` | |
const GOBL_SCHEMAS_DIR = path.join(__dirname, "..", "gobl", "data", "schemas") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%PDF-1.3 | |
%���� | |
8 0 obj | |
<< | |
/Type /ExtGState | |
/ca 1 | |
>> | |
endobj | |
10 0 obj | |
<< |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { IncomingMessage } from 'http' | |
import { NextRequest } from 'next/server' | |
import { ClientConfig, AuthenticationResponse, APIError, Hit } from 'pirsch-sdk/types' | |
const referrerQueryParams = ['ref', 'referer', 'referrer', 'source', 'utm_source'] | |
const defaultBaseURL = 'https://api.pirsch.io' | |
const defaultTimeout = 5000 | |
const defaultProtocol = 'http' | |
const authenticationEndpoint = '/api/v1/token' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-else-return */ | |
// disabling no-else-return for readability | |
import { Cache, Data, Variables } from '@urql/exchange-graphcache' | |
import { | |
ArgumentNode, | |
DocumentNode, | |
EnumValueNode, | |
FieldNode, | |
ObjectValueNode, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, setState, useRef } from "react"; | |
import Observer from "@researchgate/react-intersection-observer"; | |
import anime from "animejs"; | |
import { ANIMATIONS } from "constants"; | |
function handleIntersection(event, ref, delay, callback) { | |
if (event.isIntersecting) { | |
callback(); | |
anime.set(ref, { opacity: 0 }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ReactPlayer from 'react-player' | |
import { useSize } from 'react-use' | |
const videoConfig = { | |
vimeo: { | |
playerOptions: { | |
background: true | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd; mkdir .ssl | |
openssl req -newkey rsa:2048 -x509 -nodes -keyout .ssl/localhost.key -new -out .ssl/localhost.crt -subj /CN=localhost -reqexts SAN -extensions SAN -config <(cat /System/Library/OpenSSL/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:localhost')) -sha256 -days 3650 | |
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain .ssl/localhost.crt | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function polarToCartesian(centerX, centerY, radius, angleInDegrees) { | |
var angleInRadians = (angleInDegrees-90) * Math.PI / 180.0; | |
return { | |
x: centerX + (radius * Math.cos(angleInRadians)), | |
y: centerY + (radius * Math.sin(angleInRadians)) | |
}; | |
} | |
function describeArc(x, y, radius, startAngle, endAngle){ | |
var start = polarToCartesian(x, y, radius, endAngle); |
NewerOlder