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 / createwallet.js
Last active May 20, 2022 11:07
Cardano Javascript
let walletServer = walletserver.init("path")
let recoveryPhrase = seed.generateRecoveryPhrase()
let mnemonic = seed.toMnemonicList(recoveryPhrase)
let passphrase = "name"
let walletName = "name"
let wallet = await walletServer.createOrRestoreShelleyWallet(walletName, mnemonic, passphrase)
@Goodnessuc
Goodnessuc / scraper.go
Last active May 24, 2022 06:40
scraping hackernews using the Goquery package
package main
import (
"fmt"
"github.com/PuerkitoBio/goquery"
"net/http"
)
type Information struct {
link string
@Goodnessuc
Goodnessuc / mail.go
Last active June 27, 2022 09:55
Sending Emails in Go using any Mail Service
package main
import (
"crypto/tls"
"fmt"
"log"
@Goodnessuc
Goodnessuc / linkedlist.go
Created June 25, 2022 12:02
Implementation of a linkedlist in Go
package main
import "fmt"
type Node struct {
data any
next *Node
}
type LinkedList struct {
@Goodnessuc
Goodnessuc / nethttp.go
Created June 26, 2022 06:15
A CRUD API using the net/http package
package main
import (
"encoding/json"
"log"
"net/http"
)
type Person struct {
Name string `json:"name"`
@Goodnessuc
Goodnessuc / randomgenerator.go
Last active November 10, 2023 13:02
Generate Cryptographically secure random values of any type in Go
// In this script, we'll create a function to generate secure random strings.
// First, define the function that generates the random string.
func generateRandomString(chars string, length int) string {
// Create an array of bytes with the specified length.
bytes := make([]byte, length)
// Use crypto/rand to fill the byte array with secure random bytes.
_, err := rand.Read(bytes)
if err != nil {
@Goodnessuc
Goodnessuc / fltk.rs
Created July 16, 2022 09:17
fltk demo
// [dependencies]
// fltk = { version = "^1.3", features = ["fltk-bundled"] }
use fltk::{app, prelude::*, window::Window};
fn my_app() {
let app = app::App::default();
let mut app_window = Window::new(100, 100, 400, 300, "Checking out the FLTK-rs Library");
app_window.end();
@Goodnessuc
Goodnessuc / jwt.go
Created July 24, 2022 15:33
JWT tutorial in Go using the golang-jwt package
package main
import (
"encoding/json"
"fmt"
"github.com/golang-jwt/jwt"
"log"
"net/http"
"time"
)
@Goodnessuc
Goodnessuc / PushaG.sh
Last active June 8, 2023 13:39
Helper file for pushing code to github with a commit message input
git add .
echo -n "🔊 What's the commit message 👉 "
read response
git commit -m "$response"
git push origin main
@Goodnessuc
Goodnessuc / gin.go
Last active January 18, 2024 09:24
CRUD API in Go using the Gin FrameWork - Article for Earthly Technologies
package main
import (
"github.com/gin-gonic/gin"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
"log"
"net/http"
)