Skip to content

Instantly share code, notes, and snippets.

View nikhilsaraf's full-sized avatar
💭
Kelping

Nikhil Saraf nikhilsaraf

💭
Kelping
View GitHub Profile
@lukas-h
lukas-h / license-badges.md
Last active September 17, 2024 21:32
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)

@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)
}
@amatellanes
amatellanes / celery.sh
Last active August 29, 2024 10:08
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.#'),