Skip to content

Instantly share code, notes, and snippets.

View manigandand's full-sized avatar
👨‍💻
Go, MongoDB, NodeJS, Kubernetes

Manigandan Dharmalingam manigandand

👨‍💻
Go, MongoDB, NodeJS, Kubernetes
View GitHub Profile
@drewolson
drewolson / reflection.go
Last active November 20, 2023 09:39
Golang Reflection Example
package main
import (
"fmt"
"reflect"
)
type Foo struct {
FirstName string `tag_name:"tag 1"`
LastName string `tag_name:"tag 2"`
@andelf
andelf / sendMail.go
Last active September 20, 2023 15:13
golang send mail net/smtp SMTP
package main
import (
"log"
"net/mail"
"encoding/base64"
"net/smtp"
"fmt"
"strings"
@mattetti
mattetti / multipart_upload.go
Last active April 22, 2024 05:24
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 3, 2024 12:59
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"
@AntoineAugusti
AntoineAugusti / limitConcurrentGoroutines.go
Last active April 8, 2024 08:33
Limit the maximum number of goroutines running at the same time
package main
import (
"flag"
"fmt"
"time"
)
// Fake a long and difficult work.
func DoWork() {
@wojteklu
wojteklu / clean_code.md
Last active May 3, 2024 08:55
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@LeCoupa
LeCoupa / redis_cheatsheet.bash
Last active March 18, 2024 09:08
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@primaryobjects
primaryobjects / commit.png
Last active May 31, 2023 09:34
How to setup prettier as a pre-commit hook for Git commits.
commit.png
@manigandand
manigandand / .tmux.conf
Last active March 1, 2023 08:24
Mac Setup
set-window-option -g xterm-keys on
set default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color*:Tc"
set-window-option -g mode-keys vi
# split panes using | and -
unbind '"'
unbind %
bind | split-window -h
bind - split-window -v