Skip to content

Instantly share code, notes, and snippets.

View Goodnessuc's full-sized avatar
🎯
Focusing

Ukeje Chukwuemeriwo Goodness Goodnessuc

🎯
Focusing
View GitHub Profile
@Goodnessuc
Goodnessuc / gitlab.go
Created December 30, 2023 09:33
GitLab Oauth Example
package main
import (
"context"
"encoding/json"
"fmt"
"golang.org/x/oauth2"
"io"
"net/http"
)
@Goodnessuc
Goodnessuc / gith.go
Created December 30, 2023 08:42
GitHub OAuth Golang
package main
import (
"context"
"encoding/json"
"fmt"
"golang.org/x/oauth2"
"golang.org/x/oauth2/github"
"io"
"net/http"
@Goodnessuc
Goodnessuc / Dockerfile
Created September 22, 2023 02:47
My Typical Dockerfile
# Build stage
FROM golang:1.20-alpine AS build
# Set the working directory inside the container
WORKDIR /app
# Copy the Go application source code into the container
COPY . .
# Build the Go application
@Goodnessuc
Goodnessuc / optimize.go
Last active September 3, 2023 15:50
Full code for the Earthly Technologies Article on Optimizing SQL Queries
package main
import (
"fmt"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"gorm.io/gorm/schema"
"log"
"time"
)
@Goodnessuc
Goodnessuc / fake_database.go
Last active September 3, 2023 14:26
A program that generates X no of rows of fake data for database insertion/operation (just modify the struct)
package main
import (
"github.com/brianvoe/gofakeit/v6"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"log"
"time"
)
@Goodnessuc
Goodnessuc / main.go
Created March 3, 2023 09:01
Converting PNG files to JPG
package main
import (
"image/jpeg"
"image/png"
"os"
"strings"
)
func main() {
@Goodnessuc
Goodnessuc / mux.go
Created February 16, 2023 05:53
CRUD RESTful API in Go with the Gorilla Mux Package - Article for RedGate's Simple Talk Blog
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"github.com/gorilla/mux"
"gorm.io/driver/sqlite"
@Goodnessuc
Goodnessuc / gsod.md
Last active February 25, 2023 08:36
GSoD Application HTML

Ukeje Goodness C | LinkedIn Github Portfolio Resume Main Tech Blog Linktree Twitter | About Me Hey there, I am Ukeje Goodness, an opensource enthusiast, backend developer, and technical writer focused on Python, Golang, and Rust while writing documentation for APIs, CLI apps, and other projects. I have over 3 years of experience with technical writing. My goal is to bring clarity to your technical projects.

@Goodnessuc
Goodnessuc / nnenna.py
Created February 5, 2023 07:19
a python file that converts audio to text using the speech recognition
import speech_recognition as sp_recog
from time import sleep
def capture_audio():
recog = sp_recog.Recognizer()
audio_file = sp_recog.AudioFile('AudioFile.wav')
with audio_file as source:
recog.pause_threshold = 1
@Goodnessuc
Goodnessuc / transact.go
Last active November 13, 2022 10:35
Database transactions in Go
package main
import (
"context"
"database/sql"
_ "github.com/mattn/go-sqlite3"
"log"
)
func main() {