Today I Learned
This is a list of small things that I've learned recently in my day-to-day work. It's mostly programming related but you never know, I might slip in some other stuff too. One of the things I've always found interesting about programming is that there is so much depth to the field that even if you are considered an "expert" in an area, you can still have blind spots, and totally miss handy techniques, tools or strategies. So some of the stuff in this list might seem obvious, but who knows, there might be other things that you've missed too!
Searching the current folder on a mac by default
A handy productivity improvement
websearch_to_tsquery for Postgres full text search
Full text search in postgres is awesome but constructing queries can be a bit tedious. websearch_to_tsquery
makes that super easy.
How to pass a list as a param to pandas read_sql_query with sqlalchemy
I'm very used to passing an array of items to a postgres query using libraries for nodejs like pg-promise
so was surprised how hard it was to figure out how to do this with python, pandas and sqlalchemy
Get postgres query results as JSON
A super handy snippet to get the results of a query as JSON
How to review git merge branches
Common git workflows often result in big merge branches that are impossible to review on github, turns out they are easy to review using tig show
Python HTTP Logger
A bit of a weird thing to do, but just in case it's useful again
Notion supports mermaid diagrams
I knew github had this feature, but didn't know that notion had it even earlier
Order by statements in postgres aggregates
Control the order of results in list aggregates