Skip to content

Instantly share code, notes, and snippets.

View noelruault's full-sized avatar
💭
Let's Go into details.

Noël Ruault noelruault

💭
Let's Go into details.
View GitHub Profile
@MelchiSalins
MelchiSalins / http-rate-limit.go
Last active June 9, 2024 18:12
GoLang HTTP Client with Rate Limiting
package main
import (
"context"
"fmt"
"net/http"
"time"
"golang.org/x/time/rate"
)
@YumaInaura
YumaInaura / 00_README.md
Last active June 9, 2024 17:39
Golang — Understanding channel, buffer, blocking, deadlock and happy groutines.

Golang — Understanding channel, buffer, blocking, deadlock and happy groutines.

I was so confused to understand behaviior of Golang channels, buffer, blocking, deadlocking and groutines.

I read Go by Example topics.

@silkeh
silkeh / grace.go
Created June 4, 2018 07:27
Golang graceful restart with TCP connections
package main
import (
"encoding/json"
"flag"
"io/ioutil"
"log"
"net"
"os"
"os/signal"
@hackintoshrao
hackintoshrao / sum.go
Last active April 5, 2022 07:37
Simple program for concurrently summing up numbers.
package main
import "fmt"
// function to add an array of numbers.
func sum(s []int, c chan int) {
sum := 0
for _, v := range s {
sum += v
}
@mrliptontea
mrliptontea / sublime-text-3-windows-shortcuts.md
Last active June 15, 2024 16:22 — forked from TheShrike/gist:6111200
Sublime Text 3 - Useful Shortcuts (Windows)

Sublime Text 3 - Useful Shortcuts (Windows)

General

Shortcut Description
Ctrl+Shift+P command prompt
Ctrl+Alt+P switch project
Ctrl+P go to file
Ctrl+G go to line
@Zearin
Zearin / python_decorator_guide.md
Last active June 28, 2024 13:59
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

@Kartones
Kartones / postgres-cheatsheet.md
Last active June 30, 2024 07:52
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)