Skip to content

Instantly share code, notes, and snippets.

View dezren39's full-sized avatar
🕵️‍♂️
Processing..

Drewry Pope dezren39

🕵️‍♂️
Processing..
View GitHub Profile
// https://github.com/samber/do/issues/30#issuecomment-1705616069
// https://play.golang.org/p/yHLzoV9To_5
package main
import (
"errors"
"fmt"
"sync"
)
package main
import (
"fmt"
)
type Empty interface {
IsEmpty() bool, error
}
type Config interface {
@dezren39
dezren39 / LICENSE
Created February 26, 2024 10:19 — forked from shaneutt/LICENSE
Golang: Demonstrate creating a CA Certificate, and Creating and Signing Certs with the CA
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@dezren39
dezren39 / 0_bench_test.go
Created February 17, 2024 08:35 — forked from eliasdaler/0_bench_test.go
The quest for a good vector library for a gamedev
package main
import (
"testing"
"github.com/go-gl/mathgl/mgl32"
"github.com/kvartborg/vector"
"github.com/ungerik/go3d/vec2"
"gonum.org/v1/gonum/mat"
)
@dezren39
dezren39 / gist:06e6e612b8bfd55491c5330b2f54f704
Last active February 3, 2024 13:33
x mods powershell conversational
Invoke-Expression (&starship init powershell)
Import-Module HistoryPx
function xx(
[Parameter(Position = 0, ValueFromPipeline = $true)]$1,
[Parameter(Position = 1, ValueFromRemainingArguments = $true, ValueFromPipeline = $true)]$2
) {
function x(
[Parameter(Position = 0, ValueFromPipeline = $true)]$3,
[Parameter(Position = 1, ValueFromRemainingArguments = $true, ValueFromPipeline = $true)]$4
) {
@dezren39
dezren39 / koanf.go
Created December 24, 2023 15:45 — forked from jxsl13/koanf.go
Koanf and Cobra integration
package config
import (
"errors"
"fmt"
"os"
"reflect"
"strconv"
"strings"
@dezren39
dezren39 / Import-Lib.ps1
Last active November 20, 2023 14:07
Import-Lib.ps1
Set-StrictMode -Version Latest
$PSNativeCommandUseErrorActionPreference = $true
if ($PSNativeCommandUseErrorActionPreference) {
# always true, this is a linter workaround
$ErrorActionPreference = "Stop"
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
# sometimes you might need to update these to unicode or another format.
# unicode is the only normal one that stays the same between powershell 5 and pwsh core.
Set-StrictMode -Version Latest
$PSNativeCommandUseErrorActionPreference = $true
if ($PSNativeCommandUseErrorActionPreference) {
$ErrorActionPreference = "Stop"
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
$PSDefaultParameterValues['*:Encoding'] = 'utf8'
$utf8 = New-Object System.Text.UTF8Encoding($true)
Set-StrictMode -Version Latest
$PSNativeCommandUseErrorActionPreference = $true
if ($PSNativeCommandUseErrorActionPreference) {
# always true, this is a linter workaround
$ErrorActionPreference = "Stop"
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
# sometimes you might need to update these to unicode or another format.
# unicode is the only normal one that stays the same between powershell 5 and pwsh core.
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
sudo apt update && sudo apt install charm