Featured Project - dash. - a glassmorphic dashboard


dash-dot-png

dash. (or dashdot) is a modern server dashboard, running on the latest tech, designed with glassmorphism in mind. It is intended to be used for smaller VPS and private servers. Images are hosted on DockerHub, and are available for both AMD64 and ARM devices.

The image will require use of the --privileged option flag. This option gives the container privileged access to the host system, allowing it to perform potentially dangerous operations that are typically restricted.

You can find out more about this featured GitHub project here.

Check out the dash. instance for node1


Authored by Michael Lamb.
Published on 24 May 2023.
Tags: feature


How I stream with OBS


What is OBS

OBS is a video capture technology built as open source software. Plugins are available to extend functionality and add helpful features, such as a Twitch integration to view chat and live streaming stats. OBS is also capable of recording, helpful for people who are interested in sharing content like a code review.

I use OBS to stream to two different channels: my personal channel @michaellambgelo and the channel I run for work, @cspiregaming. In general, I use OBS to put together the primary view for what I want to stream to Twitch.

I use the same technologies for both channels but in different ways. For my personal channel, I’m primarily interested in interacting with the chat via microphone. With C Spire Gaming, I’m primarily interested in interacting with the chat myself via the camera and the group I have assembled. How that group is assembled is varied, and thus there are multiple implementations possible for streaming I’ve found.

Video first

For most streams, I want a camera on myself and to capture at least one game screen. I’ve found it wonderfully trivial to use both my personal and my work iPhone as a camera to help me compartmentalize between the two streams. The Twitch app for iPhone enables use of the front-facing camera for livestreaming with a simple interface that also displays quick stats and offers a view of the chat. For people interested in streaming using the Just Chatting cateogry, this is really all that’s needed to get started building your Twitch presence.

Desktop capture can take place many ways. One method is to use a capture card: a video interface capable of copying a video feed; usually repeats an HDMI connection. The interface can be added directly to OBS and formatted with any other elements as desired. Other, more complex methods include use of virtual cameras in OBS and use of VDO.ninja. VDO.ninja will be discussed in a separate section below.

Audio singularly

There’s always one experience I’m obsessed about: the viewers. Let’s say it’s a bleed over of being Customer inSPIREd.

If there’s someone who’s out there watching this stream, we can only hope they’re listening. There’s also the chance they can’t hear us, so there’s the question of whether finding a closed captioning solution is worthwhile or not.

I haven’t found an easy solution for closed captioning on these streams that are available for public consumption. For professional work I’m able to use Microsoft Teams and its machine intelligence which takes advantage of the stream delay to parallel process the audio stream and generate live captioning.

Regardless, I have to think of the stream audio as a singular experience. For my streams at home, I include the desktop audio for whatever game I’m playing, plus a microphone I can physically mute. For C Spire Gaming streams featuring a virtual event, it’s more complex. For C Spire Gaming streams that are in person, I want to be able to capture a group of people playing the same game, which is a different question with the same answer as my personal stream but which requires a different configuration: either a single microphone or an array of well-mixed microphones to capture multiple people and their crosstalk as a singular experience, as though one were in the room. I’ll deal with virtual events in the next section, so in person events and personal streams are the focus here.

iPhone as a microphone

I used the iPhone as a microphone at yesterday’s C Spire Gaming Family Meetup. I streamed both the Mario Kart 8 Deluxe tournamenttwitch vod link challonge link and our Mario-only Super Smash Bros. Ultimate tournamenttwitch vod link challonge link this way. It was great to capture the 4-5 people sitting in front of the screen as well as the general soundscape around them. Sometimes the crosstalk is not intelligible but that’s when the most exciting things are happening on stream, so it feels impossible to separate them without multiple cameras and a team of audio engineers working to individuate each player such that the stream is so dynamic that they could run an indivudal stream in addition to being included in another ongoing livestream. C Spire Gaming just isn’t quite at that level of sophistication when it comes to our live tournaments, but maybe one day we’ll have something that can scale.

Yeti Blue microphone

I use a Yeti Blue mic for my personal streams. There is a physical mute button, which I prefer, and the quality is higher than the wireless Corsair headset I have. I’ve learned that using a headset for all audio out is the best when in a space that is also participating in the stream via audio, that way there is no chance of the audio doubling into the stream without the headset being deafeningly loud. I’ve gotten my mic configured such that it sounds good when I’m at a low volume and a high volume, should I get excited and exclaim. At least, I hope so! That’s my goal, and I fully endorse my audience giving me feedback if this is offbase.

VDO.ninja

For C Spire Gaming Community Game Nights I use a technology called VDO.ninja. I can create a virtual room and invite a group of people inside. There, they’re able to share their video and/or their microphone and camera. Similar to the sentiment I share in the Yeti Blue microphone section, anyone joining the stream must use a headset for all audio they want to hear so as not to crowd out the stream audio with the ambient sound. I can include individuals dynamically using a link per person, though primarily I let the stream run viewing a group scene which is also a single link generated by VDO.ninja and imported into OBS as a browser source. VDO.ninja uses WebRTC to create peer-to-peer connections between anyone who joins the room, and it is relatively straightforward to share the desktop (and capture system audio, if needed) as well as any connected cameras, so joining a livestream for C Spire Gaming just requires a link and a password.

While I haven’t needed to use VDO.ninja for an in-person event yet, I have found it useful for streaming to my personal channel. Because it’s P2P streaming, using another machine in my house to run the stream decouples the stream processing from my gaming machine.

One drawback to VDO.ninja is that mixing audio for multiple people does not appear to be trivial, so for our purposes when streaming groups of people for C Spire Gaming everyone is muted in VDO.ninja and instead we use a Discord voice channel, which I’m then able to capture and send to the stream.

Conclusion

OBS is a powerful tool which I use to stream for multiple channels on Twitch. The last, perhaps most important aspect of OBS is the ability to save and switch between profiles and scene collections. I consider these components of OBS tightly coupled, with many scene collections intended for one profile.


Authored by Michael Lamb.
Published on 02 April 2023.
Category: Social


Three Questions for ChatGPT


OpenAI currently runs ChatGPT for free at chat.openai.com. I’ve played around with it a bit and recently asked three questions. Those questions and ChatGPT’s responses are logged here.

Explain your learning model

ChatGPT is a type of language model called a transformer. It is trained using a variant of the transformer architecture called GPT-3 (Generative Pre-trained Transformer 3). This model is trained on a massive amount of text data using a technique called unsupervised learning, which means that it learns patterns in the data without any explicit labels or supervision. The model is pre-trained on a diverse set of internet text and fine-tuned on specific task by fine-tuning on smaller dataset. The model uses a deep neural network with attention mechanisms to generate human-like text. It can be fine-tuned for a wide range of natural language processing tasks, such as language translation, question answering, and text summarization.

What do you know about the company C Spire

C Spire is a telecommunications company based in Mississippi, USA. It provides a wide range of services including wireless, home phone, internet, and television services. The company is known for its focus on customer service and for offering customized plans and packages for its customers. C Spire also operates a number of retail stores in Mississippi and other states where it provides services. Additionally, it offers enterprise-level services such as cloud computing, data center, and cybersecurity services to businesses. The company is privately held and was founded in the 1990s.

What are the basic rules for telecommunications companies operating in the United States

Telecommunications companies operating in the United States are subject to a wide range of rules and regulations set by the federal government, including the Federal Communications Commission (FCC). Some of the basic rules that these companies are required to follow include:

  1. Universal Service: Telecommunications companies are required to contribute to the Universal Service Fund, which provides support for telecommunications services in rural and low-income areas.
  1. Interconnection: Telecommunications companies are required to interconnect with other companies to ensure that customers can reach all networks and services.
  1. Network Neutrality: Telecommunications companies are prohibited from discriminating against or blocking lawful internet traffic, also known as “net neutrality”
  1. Transparency: Telecommunications companies are required to provide accurate and timely information to customers about the prices, terms, and conditions of their services.
  1. Consumer protection: Telecommunications companies are required to follow rules to protect consumers from fraud, cramming and slamming, and other deceptive practices.
  1. Emergency Services: Telecommunications companies are required to provide 911 emergency services and meet other obligations to ensure public safety.

These are some of the basic rules that telecommunications companies operating in the United States must follow, but there are many more specific rules and regulations that apply to different types of services and different parts of the industry.

I believe you had a wrong fact in an earlier response. You told me C Spire was founded in the 1990s but the original company was created in 1988

I apologize for the error in my previous response. You are correct that C Spire was founded in 1988, not the 1990s. I apologize for any confusion this may have caused.

Why should more people use chatgpt

ChatGPT is a powerful language model that can be fine-tuned for a wide range of natural language processing tasks. Some of the benefits of using ChatGPT include:

  1. High-quality text generation: ChatGPT is trained on a large dataset of internet text, which allows it to generate human-like text that is often difficult to distinguish from text written by a human.
  1. Customizable: ChatGPT can be fine-tuned on a smaller dataset to perform specific tasks, such as answering questions or generating text in a specific style or tone.
  1. Efficient: ChatGPT is a highly efficient model that can be run on a wide range of devices, from high-performance servers to mobile devices, making it accessible to a wide range of users.
  1. Versatile: ChatGPT can be used for a wide range of applications such as text completion, text generation, question answering, language translation, text summarization, and many more.
  1. Cost effective: ChatGPT can be used for many tasks that would otherwise require human labor, which can save time and money.

In summary, ChatGPT is a versatile and efficient model that can be used to generate high-quality text, perform natural language processing tasks, and save time and money. It can be utilized by individuals, small businesses and large companies to automate various tasks, improve customer service, or creating new content.


Authored by Michael Lamb.
Published on 18 January 2023.


Adding Swagger UI to Spring Boot projects


This post copies and updates text from a previous version

Check out the previous version of this post if you want to compare the differences.

Spring Boot is a powerful project from the Spring ecosystem which enables developers to maximize their leverage of Spring applications. Standalone projects can be generated at start.spring.io with any other additional dependencies of Spring project included in just a few clicks.

I have created a Spring Boot demo project available on my GitHub. I use this project to demonstrate some tasks I perform regularly in Spring Boot.

Spring Logo

Swagger UI

If you’ve been a follower of this blog you might recall I have previously integrated Swagger UI into a Go application (check out this blog post from October 2021).

Swagger is a suite of tools which seeks to provide OpenAPI specifications and definitions. Codebases can be generated from a Swagger doc, just as an existing codebase can be documented by adding Swagger-identifiable annotations.

In this post I will show how I to integrate Springfox Swagger UI into a Spring Boot application. I will then demonstrate integrating Springdoc as an alternative, as Springfox hasn’t been updated in a while (the last commit was Oct, 2020). Springdoc supports the latest version of Spring Boot as of writing (2.7.2).

but first…

How this post is structured

There are three MILE MARKER sections. #1 precedes the relevant code blocks for Springfox. #2 occurs after Springfox is concluded and before Springdoc code blocks begin. #3 appears after the conclusion of Springdoc.

MILE MARKER 1

➡️ Springfox integration (you are here)

🔜 Springdoc integration

Springfox

This configuration uses an existing Spring Boot project and integrates io.springfox/swagger-boot-starter (version 3.0.0).

pom.xml - add Springfox dependency

Add the Springfox Spring Boot starter dependency.


<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-boot-starter</artifactId>

    <version>3.0.0</version>

</dependency>

springfox-boot-starter provides the following artifacts from io.springfox:

  • springfox-oas
  • springfox-data-rest
  • springfox-bean-validators
  • springfox-swagger2
  • springfox-swagger-ui

Main Application Entry Point - add Springfox annotations

Wherever your Spring Boot app starts is dependent on your project. In my demo application, this is a file called DemoApplication.java.

In this file, only two annotations need to be added to the base class:


@EnableOpenApi
@EnableSwagger2

AppConfiguration.java - add Springfox annotations

If it doesn’t exist yet, create a new Java class called AppConfiguration.java. The class itself will be empty but it will have a few annotations that will enable Springfox to scan the application code and identify endpoints. You could add these annotations on the main application class but I like it this way as it feels more explicit in intention.


@Configuration
@EnableWebMvc
@ComponentScan("dev.michael.demo")
public class AppConfiguration {
}

SpringConfig.java - add Springfox WebMvcConfigurer registries

SpringConfig.java will implement the WebMvcConfigurer interface. It will override a couple of methods so that Spring Boot can serve Swagger UI alongside the Spring Boot app.


@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.
    addResourceHandler("/swagger-ui/**")
    .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/")
    .resourceChain(false);
}

addResourceHandlers will enable Spring Boot to find Swagger resources.


@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/swagger-ui/")
    .setViewName("forward:" + "/swagger-ui/index.html");
}

addViewControllers will enable Spring Boot to serve the main Swagger UI page.

Springfox Conclusion

Swagger UI will now automatically generate API documentation every time the Spring Boot application is started.

MILE MARKER 2

✔️ Springfox integration

➡️ Springdoc integration (you are here)

Springdoc

Optional: For an example migration from Springfox to Springdoc, look at this commit on my Redis hackathon repo.

pom.xml - add Springdoc depdendency


<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-ui</artifactId>

    <version>1.6.11</version>

</dependency>

application.properties - add Springdoc configuration properties


springdoc.packages-to-scan=dev.michaellamb.demo
springdoc.paths-to-match=/api/**
springdoc.swagger-ui.path=/swagger-ui.html
springdoc.swagger-ui.enabled=true

Springdoc Conclusion

Springdoc is a bit simpler in configuration than Springfox, relying primarily on application.properties to determine which packages to scan to document HTTP API routes for the app and without needing to override any Spring Beans to serve the frontend.

MILE MARKER 3

✔️ Springfox integration

✔️ Springdoc integration

Great job! 🎉

You have a Spring Boot app ready to start developing an auto-documented HTTP API.


Authored by Michael Lamb.
Published on 15 September 2022.
Category: Spring


Trunk Based Development & More


This overview of trunk based development was created for the Customer Applications team at C Spire. The information presented represents no proprietary systems or data, and this content uses trunkbaseddevelopment.com as a primary source. The presentation was recorded using Soapbox by Wistia.

Bytes & Bites 2022

Make connections. Make waves.

Birmingham’s premier IT event is back. And it means business. Network with the brightest IT professionals and learn about the latest solutions from industry leaders at C Spire Business’s annual event.

bytes & bites splash

10 AM - 2 PM 9.22.22 | Avondale Brewing Co., Birmingham, AL

Register Now


Authored by Michael Lamb.
Published on 07 September 2022.
Tags: feature



About michaellamb.dev

Michael Lamb is a software engineer working at C Spire. If you have a blog-specific inquiry please create a new issue on GitHub. Feel free to fork this blog and build your own!

Get to know who I am in my first post Hello, World!

© Copyright 2021-2025
Michael Lamb Blog