Skip to content

Instantly share code, notes, and snippets.

View MarlikAlmighty's full-sized avatar
🏠
Working from home

Marlik Almighty MarlikAlmighty

🏠
Working from home
View GitHub Profile
@xeoncross
xeoncross / mail.go
Last active November 5, 2023 10:58
Simple SMTP mail sender in golang that can send email directly to anyone. Super basic, but great for sending notice emails. Upgrades to STARTTLS if it can.
package main
import (
"encoding/base64"
"fmt"
"log"
"net"
"net/mail"
"net/smtp"
"strings"
@cuixin
cuixin / json_to_map.go
Created October 25, 2017 01:53
json to map[string]interface{} example in golang
package main
import (
"encoding/json"
"fmt"
)
func dumpMap(space string, m map[string]interface{}) {
for k, v := range m {
if mv, ok := v.(map[string]interface{}); ok {