Skip to content

Instantly share code, notes, and snippets.

View nikhilsaraf's full-sized avatar
💭
Kelping

Nikhil Saraf nikhilsaraf

💭
Kelping
View GitHub Profile
@amatellanes
amatellanes / celery.sh
Last active October 22, 2024 12:13
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@orcaman
orcaman / gist:a626f9f4af2a491dd9d1
Created October 5, 2015 14:11
Golang: count open files
func countOpenFiles() int64 {
out, err := exec.Command("/bin/sh", "-c", fmt.Sprintf("lsof -p %v", os.Getpid())).Output()
if err != nil {
fmt.Println(err.Error())
}
lines := strings.Split(string(out), "\n")
return int64(len(lines) - 1)
}
@lukas-h
lukas-h / license-badges.md
Last active November 11, 2024 03:22
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)