RSSAmplifier

Blog

My Memory

Outsourcing my memory and thoughts (and other ramblings) to the web

putridparrot.comRSS feed ↗10 posts

Latest posts

Creating and setting up a Postgres user

In some cases we want to create a readonly user (for example) for our database access, so let’s walk through the steps etc. to create such a use in Postgresql Before we start, let’s see how we can list the existing users Create the user Allow the user to connect to the database using Grant […]

Deploying & Using KEDA

We’re often using HPA (Horizontal Pod Autoscaling) or may looked at VPA (Vertical Pod Autoscaling) but there’s also KEDA (Kubernetes Event-driven Autoscaling) which is an operator to scale workloads based upon (as the name suggests) events, for example queue triggers could come from a message bus/queue such as RabbitMQ. KEDA can also be used in […]

Let’s talk Server-Sent Events

Server-Sent Events (SSE) are a lightweight streaming/push technology for pushing updates to a web client over a single long-live HTTP connection. For example as use case where your web client connects to a server and periodically receives events or notifications from the server. Alternates to SSE might be long polling the server for updates, web […]

Inlining methods in C#

Inlining is a simple process of, essentially replacing a method call with the contents of the call, it’s main benefits are around performance in that it removed the method call/stack frame overhead and is especially useful in tight looks or hot path scenarios. An example in C++ we might have something like class Math { […]

Scheduled Azure Devops pipelines

I wanted to run some tasks once a day. The idea being we run application to check from any drift/changes to configuration etc. Luckily this is simple in Azure devops. We create a YAML pipeline with no trigger and create a cronjob style schedule instead as below trigger: none schedules: - cron: "0 7 * […]

Sending email via the Azure Communication Service

I’m wanting to send emails from an Azure function upon a call from my React UI. Azure has the Communications Service and Email Communication Service for this functionality. In the Azure Portla Create a Communication service resource to your resource group Create an Email Communication resource to your resource group Add a free Azure subdomain […]

ReturnType and Parameters in Typescript

Typescript has a couple of types which are useful for describing types when none are strictly specified. Let’s assume we have this simple function, which takes a string parameter and returns function getData(key: string) { return { key, firstName: "Scooby", lastName: "Doo" } } Using ReturnType creates a type that matches the getData return. i.e. […]

Sentiment analysis using Python and TextBlob

Let’s create a really simple FastAPI with, create yourself our app file (app.py) and requirements file (requirements.txt). We’re going to use TextBlob to process our text. In the requirements.txt add the following fastapi uvicorn textblob In the app.py add the following imports from fastapi import FastAPI from textblob import TextBlob Now let’s create the FastAPI […]

Pick and Omit in Typescript

Pick and Omit are used to pick fields from a type to create a new type or, in the case of Omit, returns a type with supplied fields omitted. For example, if we have a simple type such as this type Person = { firstName: string lastName: string age: number } We might wish to […]

CSS functions

CSS functions extend CSS to give it a more “programming language” set of features, i.e. we can create functions, with parameters, even add type safety and return values. Let’s start by looking at the basic syntax on a simple function which returns a given value depending on the “responsive design” size. @function --responsive(--sm, --md, --lg: […]