Skip to content

Instantly share code, notes, and snippets.

View benileo's full-sized avatar

Ben Irving benileo

  • Nelson, BC Canada
  • 07:23 (UTC -07:00)
View GitHub Profile
@ewdurbin
ewdurbin / LICENSE
Last active September 18, 2018 20:59
Little bit of magic to send your DataDog dogstatsd metrics to CloudWatch
Simplified BSD License
Copyright (c) 2016-2017, Ernest W. Durbin III
Copyright (c) 2016-2017, The Groundwork LLC.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
@benileo
benileo / contributions.go
Last active April 22, 2017 02:57
My github contributions
package main
import (
"encoding/json"
"fmt"
"html/template"
"io/ioutil"
"net/http"
"os"
"sort"
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@benileo
benileo / mongod.service
Last active March 1, 2021 04:57
Systemd Service Script for Mongod On Ubuntu 15.04, 15.10, 16.04 Xenial
[Unit]
Description=High-performance, schema-free document-oriented database
Documentation=man:mongod(1)
After=network.target
[Service]
Type=forking
User=mongodb
Group=mongodb
@sithembiso
sithembiso / pull.go
Last active March 15, 2023 16:17
git pull using git2go
func (repo *Repo) Pull() error {
branch, err := repo.Branch()
if err != nil {
return err
}
// Get the name
name, err := branch.Name()
if err != nil {
return err
@shreyansb
shreyansb / flask_profiler.py
Last active January 11, 2024 12:08
A profiler for Flask apps
"""
This module provides a simple WSGI profiler middleware for finding
bottlenecks in web application. It uses the profile or cProfile
module to do the profiling and writes the stats to the stream provided
To use, run `flask_profiler.py` instead of `app.py`
see: http://werkzeug.pocoo.org/docs/0.9/contrib/profiler/
and: http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvi-debugging-testing-and-profiling
"""