Skip to content

Instantly share code, notes, and snippets.

@angstwad
angstwad / dict_merge.py
Last active March 1, 2024 23:53
Recursive dictionary merge in Python
# Copyright 2016-2022 Paul Durivage
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@enricofoltran
enricofoltran / main.go
Last active June 26, 2024 12:16
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@bsnux
bsnux / new-ts-project.sh
Last active February 17, 2023 05:59
Creates a new TypeScript project ready to use with Node.js
#!/bin/bash
#
# Creates a new TypeScript project ready to use with Node.js
set -euo pipefail
if [[ ! -f $(which npm) ]] || [[ ! -f $(which yarn) ]]; then
echo "Please, install npm and yarn before continuing"
echo "See https://docs.npmjs.com/downloading-and-installing-node-js-and-npm"
echo "See https://yarnpkg.com/"
exit