Skip to content

Instantly share code, notes, and snippets.

View Kugelschieber's full-sized avatar
💭
Working on Pirsch

Marvin Blum Kugelschieber

💭
Working on Pirsch
View GitHub Profile
@tom2strobl
tom2strobl / pirschFetchClient.ts
Last active November 4, 2021 11:38
basically the pirsch-sdk client, without getters and fetch instead of axios to make it run on an edge / service worker environment
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'
@prologic
prologic / LearnGoIn5mins.md
Last active May 9, 2024 20:15
Learn Go in ~5mins
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE