Skip to content

Instantly share code, notes, and snippets.

View Brethel's full-sized avatar
🥱
I may be slow to respond.

Alexandre Brethel Brethel

🥱
I may be slow to respond.
View GitHub Profile
@cjavilla-stripe
cjavilla-stripe / Program.cs
Created December 27, 2021 17:46
Stripe webhook handler for .NET 6 minimal API
using Stripe;
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapPost("/webhook", async (HttpRequest request) =>
{
var json = await new StreamReader(request.Body).ReadToEndAsync();
const string signingSecret = "whsec_...";
@deepakshrma
deepakshrma / .eslintrc.json
Last active December 22, 2020 14:58
.eslintrc.json- Basic configuration for ESLint
{
"env": {
"node": true
},
"globals":{
"anyglobal":true
},
"extends": "eslint:recommended",
"rules": {
"accessor-pairs": "error",
@nielsAD
nielsAD / firefox.md
Last active July 25, 2022 11:40
Firefox privacy/performance/usability enhancing settings

Privacy

Setting Value
beacon.enabled false
geo.enabled false
dom.battery.enabled false
social.remote-install.enabled false
privacy.donottrackheader.enabled true
datareporting.healthreport.uploadEnabled false
@hgfischer
hgfischer / benchmark+go+nginx.md
Last active April 11, 2024 22:09
Benchmarking Nginx with Go

Benchmarking Nginx with Go

There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.

So, these are the different settings we are going to compare:

  • Go HTTP standalone (as the control group)
  • Nginx proxy to Go HTTP
  • Nginx fastcgi to Go TCP FastCGI
  • Nginx fastcgi to Go Unix Socket FastCGI