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
View gitlab.go
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
View gith.go
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
View 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
View optimize.go
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)
View fake_database.go
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
View main.go
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
View mux.go
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
View gsod.md

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
View nnenna.py
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
View transact.go
package main
import (
"context"
"database/sql"
_ "github.com/mattn/go-sqlite3"
"log"
)
func main() {