My first PHP package: the Discord Table Builder

Something has been bothering me for a long time. I’ve got a ton of good, kind of modular PHP code, and I’ve failed to make time to publish any of it for a long time. But today, I published my first PHP package on Packagist. šŸ˜Š

Discord Table Builder

For WhatPulse, we wanted to publish the weekly leaderboard on our Discord server for some community rivalry. But, the Discord API doesn’t have built-in support for tables or any easy way to format tabular data. I wanted something like this:

Discord table builder in action

After searching for an existing solution and coming up empty, … Read more

Cloudflare: Deploying a blog in a subdirectory of an existing site

Letā€™s say you have an existing website or web application where youā€™d like to add a blog or documentation site like VuePress or Docusaurus. While keeping it separate from the existing siteā€™s codebase, but still using the same domain name.

When it comes to search engine optimization (SEO), thereā€™s evidence that sub domains donā€™t benefit from the backlinks your main domain has, thus ranking sub domains lower.

Background

In this case, I have a typing test app calledĀ TypeTest.ioĀ and I wanted to add a blog to optimize for SEO. I did not want to add it to the NuxtJS Read more

VMware Fusion: Direct USB Keyboard & Mouse

I’ve been using a Mac for forever. It’s just the right level of ultimate control over the system, with a graphical user interface that just works ™.Ā 

But, I develop cross-platform apps (i.e., WhatPulse, MuteDeck) which need to work on both macOS and Windows. For that, I run Windows inside a VM on VMware Fusion.

This is a quick article on how to directly connect a keyboard and/or mouse to that VM, instead of using the input device sharing that’s built in.

The Need for a Keyboard & Mouse

WhatPulse is a computing activity tracker, which keeps … Read more

Learnings from a new manager

Itā€™s been ~12 months since I started managing an engineering team, and Iā€™ve learned so much from them. Here are 9 things I wished my previous managers did (or didnā€™t do).

No scheduled 1-on-1ā€™s

Make it clear that you donā€™t have to wait until a recurring touchpoint to bring up issues. Always be available for chats; enabling them is your primary job. Also, translates to: donā€™t be so busy it deters people from reaching out. Having them think, ā€œHeā€™s probably not busy; I can give him a call,ā€ is a good thing.

Goals

Please donā€™t ask them to translate company … Read more

Introducing AI Spend: AI API Usage Monitoring Made Easy

As an AI enthusiast who has built multiple AI products, I know the importance of tracking OpenAI API costs, identifying abuse instances and preventing runaway apps. While there are several tools available that enable you to see your API usage by entering the API key, I wanted an effortless and passive monitoring tool to keep track of my API usage.

Keeping this in mind, I developed AI Spend – an intelligent monitoring tool that synchronises your API usage per model in cost, tokens, and requests in an encrypted database. With this tool, you can effortlessly control the costs and … Read more

Using OpenAI’s [free] Content Moderation API

By now, everyone knows about ChatGPT, GPT itself, and OpenAI. However, OpenAI is more than GPT: you can use their API to do image generation, speech to text, and text moderation assessments.Ā This post is about their text moderation API, as I’ve recently discovered it’s free.

The idea is to use the moderation API to decide whether the rest of OpenAI’s models would accept the input text, but it can be used on its own as well. It might change in the future, but moderation API calls are not metered against your bill.Ā 

Why would you want to … Read more

Tunneling Plugwise Smile P1 Stats to Grafana

Hi! It’s been a while. I’m going to (re)start sharing solutions to problems that I’m building things for. Expect posts mostly around coding and IoT. Starting with this post; a quick tutorial on how to get power statistics from a Plugwise Smile P1 gateway to Grafana, using Telegraf.

I’ve got solar panels with Enphase inverters with central management, which has an API. Its been streaming power generation stats to Grafana using this solution, for a while. Recently, I added a Plugwise Smile P1 gateway to monitor the smart meter and I wanted to get its power stats into

Read more

© 2024 Lostdomain

Theme by Anders NorénUp ↑