Skip to content

Instantly share code, notes, and snippets.

View mrg0lden's full-sized avatar
📖
studying

محمّد mrg0lden

📖
studying
  • All Puns Intended.
  • Saudi Arabia
  • 05:07 (UTC +03:00)
View GitHub Profile
@mrg0lden
mrg0lden / random-string.go
Last active December 7, 2022 20:03
Random string generators in Go
package main
import (
"crypto/rand"
"encoding/ascii85"
"encoding/base64"
"io"
)
func randomBytes(length int) []byte {
@mrg0lden
mrg0lden / db.go
Last active August 27, 2020 16:33
Brilliant DB operations with Go without ORM :)
package db
import(
"context"
_ "github.com/doug-martin/goqu/v9/dialect/postgres"
"github.com/doug-martin/goqu/v9/exp"
"github.com/doug-martin/goqu/v9" //query builder
"github.com/jackc/pgx/v4/pgxpool" //db driver
@mrg0lden
mrg0lden / .hyper.js
Created February 14, 2019 16:02
open Hyper here
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',