Skip to content

Instantly share code, notes, and snippets.

View l-vitaly's full-sized avatar
🏠
Working from home

Vitaly Lobchuk l-vitaly

🏠
Working from home
View GitHub Profile
@l-vitaly
l-vitaly / README.md
Created April 27, 2018 19:04 — forked from tombigel/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@nstogner
nstogner / retry_http.go
Last active March 19, 2023 03:29
Go: Simple retry function (HTTP request)
// DeleteThing attempts to delete a thing. It will try a maximum of three times.
func DeleteThing(id string) error {
// Build the request
req, err := http.NewRequest(
"DELETE",
fmt.Sprintf("https://unreliable-api/things/%s", id),
nil,
)
if err != nil {
return fmt.Errorf("unable to make request: %s", err)