Skip to content

Instantly share code, notes, and snippets.

View coilysiren's full-sized avatar
🛠️
software engineering

kai [they] coilysiren

🛠️
software engineering
View GitHub Profile
@nymous
nymous / README.md
Last active December 12, 2024 08:28
Logging setup for FastAPI, Uvicorn and Structlog (with Datadog integration)

Logging setup for FastAPI

This logging setup configures Structlog to output pretty logs in development, and JSON log lines in production.

Then, you can use Structlog loggers or standard logging loggers, and they both will be processed by the Structlog pipeline (see the hello() endpoint for reference). That way any log generated by your dependencies will also be processed and enriched, even if they know nothing about Structlog!

Requests are assigned a correlation ID with the asgi-correlation-id middleware (either captured from incoming request or generated on the fly). All logs are linked to the correlation ID, and to the Datadog trace/span if instrumented. This data "global to the request" is stored in context vars, and automatically added to all logs produced during the request thanks to Structlog. You can add to these "global local variables" at any point in an endpoint with `structlog.contextvars.bind_contextvars(custom

@tatianamac
tatianamac / tatiana-mac-speaker-rider.md
Last active November 6, 2024 15:21
Tatiana Mac's Speaker Rider

Speaker Rider

by Tatiana Mac

Last updated 14 April 2021

What is a speaker rider?

As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.

Considerations

😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

@niespodd
niespodd / package.json
Last active May 8, 2023 09:07
Making web3/bitcore-lib work with Angular 6-11 and >=11
{...
"scripts": {
"postinstall": "node patch.js",
...
}
}
@shortjared
shortjared / list.txt
Last active December 18, 2024 14:17
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@eevee
eevee / gist:55426e5856f5825317b1
Last active January 28, 2021 22:51
adblock rules to hide mentions from people who don't follow you

Pop open "filter preferences" in adblock plus, and add the following rules to hide mentions from people who don't follow you (and who you don't follow).

For the interactions/notifications page:

twitter.com##.interaction-page [data-follows-you="false"][data-you-follow="false"]:not(.my-tweet)

For the mentions page:

twitter.com##.mentions-page [data-follows-you="false"][data-you-follow="false"]:not(.my-tweet)

#RIOT CODE GRRRL MANIFESTO #####(based on the original RIOT GRRRL MANIFESTO)

BECAUSE us girls crave apps and games and websites that speak to US that WE feel included in and can understand in our own ways.

BECAUSE we wanna make it easier for girls to see/hear each other's work so that we can share strategies and criticize-applaud each other.

BECAUSE we must take over the means of production in order to create our own revolution.

BECAUSE viewing our work as being connected to our girlfriends-politics-real lives is essential if we are gonna figure out how we are doing impacts, reflects, perpetuates, or DISRUPTS the status quo.

@willprice
willprice / .travis.yml
Last active June 15, 2024 04:29
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:
@sharmaansh21
sharmaansh21 / gist:9339266
Created March 4, 2014 02:34
Neo4j Ubuntu
add-apt-repository ppa:webupd8team/java && wget -O - http://debian.neo4j.org/neotechnology.gpg.key | apt-key add - && echo ‘deb http://debian.neo4j.org/repo stable/’ > /etc/apt/sources.list.d/neo4j.list && apt-get update && apt-get install oracle-java7-installer && apt-get install oracle-java7-set-default && apt-get install neo4j && sed -i.bak ‘s/#org.neo4j.server.webserver.address=0.0.0.0/org.neo4j.server.webserver.address=0.0.0.0/g’ /etc/neo4j/neo4j-server.properties && neo4j start
@prwhite
prwhite / Makefile
Last active December 18, 2024 14:17
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing