Skip to content

Instantly share code, notes, and snippets.

@VictorTaelin
VictorTaelin / implementing_fft.md
Last active May 18, 2024 18:04
Implementing complex numbers and FFT with just datatypes (no floats)

Implementing complex numbers and FFT with just datatypes (no floats)

In this article, I'll explain why implementing numbers with just algebraic datatypes is desirable. I'll then talk about common implementations of FFT (Fast Fourier Transform) and why they hide inherent inefficiencies. I'll then show how to implement integers and complex numbers with just algebraic datatypes, in a way that is extremely simple and elegant. I'll conclude by deriving a pure functional implementation of complex FFT with just datatypes, no floats.

@mape
mape / apmPatchPrisma.ts
Last active October 20, 2021 20:26
Elastic APM node client instrumenting Prisma 2 queries
import { condensePrismaQuery } from './utils';
// Screenshot of a trace sample: https://i.imgur.com/XuhuQFq.png
// Service: https://www.elastic.co/apm
// Node module: https://github.com/elastic/apm-agent-nodejs
// Prisma: https://www.prisma.io/
// Using "@prisma/client": "dev"
// Thanks to https://github.com/prisma/prisma/pull/2902
@simply-be
simply-be / openvpn_on_google_cloud.md
Last active July 26, 2019 19:22 — forked from neuni/openvpn_on_google_cloud.md
Create a openVPN server on Google Cloud Platform to connect to your Google Cloud network using openVPN and/or to route your internet traffic through the VPN (Road Warrior Scenario) rev 2018-12-17

Install openVPN server on Google Cloud using Pritunl (rev. 2018-12-17)

Purpose:

Create a openVPN server on Google Cloud Platform to connect to your Google Cloud network using openVPN and/or to route your internet traffic through the VPN (Road Warrior Scenario)

Create instance

  • Create new instance in default network
  • Choose Ubuntu 18.04 LTS
@neuni
neuni / openvpn_on_google_cloud.md
Created February 28, 2017 13:34
Create a openVPN server on Google Cloud Platform to connect to your Google Cloud network using openVPN and/or to route your internet traffic through the VPN (Road Warrior Scenario)

Install openVPN server on Google Cloud using Pritunl

Purpose:

Create a openVPN server on Google Cloud Platform to connect to your Google Cloud network using openVPN and/or to route your internet traffic through the VPN (Road Warrior Scenario)

Create instance

  • Create new instance in default network
  • Chosse Ubuntu 16.04 LTS
@gilyes
gilyes / Backup, restore postgres in docker container
Last active March 23, 2024 09:30
Backup/restore postgres in docker container
Backup:
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Restore:
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres