Skip to content

Instantly share code, notes, and snippets.

View geekpete's full-sized avatar
🫙
.

Peter Dyson geekpete

🫙
.
View GitHub Profile
@geekpete
geekpete / es-metrics.md
Created May 5, 2016 00:54
Metrics to Monitor

Elasticsearch has many metrics that can be used to determine if a cluster is healthy. Listed below are the metrics that are currently a good idea to monitor with the reason(s) why they should be monitored and any possible recourse for issues.

Version

Unless otherwise noted, all of the API requests work starting with 1.0.0. If a newer version is required for a given metric, then it is noted by the metric's name.

Metrics

Metrics are an easy way to monitor the health of a cluster and they can be easily accessed from the HTTP API. Each Metrics table is broken down by their source.

@geekpete
geekpete / gist:570c99949991a29a44c86798e487b423
Created May 10, 2016 02:39 — forked from athoune/gist:5777474
Pushing mails to Elastic Search for a Kibana analysis.
#!/usr/bin/env python
import sys
# Lamson is an application, but also the best way to read email without
# struggling with "battery include" libraries.
from lamson.encoding import from_string as parse_mail
from pyelasticsearch import ElasticSearch
from pyelasticsearch.exceptions import ElasticHttpNotFoundError
@geekpete
geekpete / backblaze b2 backup script
Created June 9, 2016 23:32 — forked from scottlinux/backblaze b2 backup script
Backup script for backblaze b2
#!/usr/bin/env bash
#
# Backup selected directories to a Backblaze B2 bucket
#
# Example daily cron:
# @daily /usr/local/bin/b2backup >/dev/null
#
# Account creds
id=xxxxxxxxxx
@geekpete
geekpete / README.md
Created June 24, 2016 02:12 — forked from miguelmota/README.md
Multiple accounts with Mutt E-Mail Client
How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@geekpete
geekpete / gpgmutt.md
Created July 12, 2016 06:35 — forked from bnagy/gpgmutt.md
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@geekpete
geekpete / salesforceredirect.py
Created August 11, 2016 09:35
salesforce redirect flask app
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Simple flask app to redirect a case number to a case url
#
__author__ = 'Peter Dyson <pete@geekpete.com>'
__version__ = '0.1.0'
from flask import Flask, redirect
from simple_salesforce import Salesforce
@geekpete
geekpete / README.md
Created August 17, 2016 04:57 — forked from bertspaan/README.md
Python script to convert DBF database file to CSV
@geekpete
geekpete / pencil-colorscheme-theme-slack.txt
Created September 14, 2016 04:49
Pencil Theme for Slack
Inspired by: https://github.com/reedes/vim-colors-pencil
#262626,#005F87,#20A5BA,#F1F1F1,#5FD7A7,#E5E6E6,#20BBFC,#FB007A
@geekpete
geekpete / GIF-Screencast-OSX.md
Created October 5, 2016 23:49 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@geekpete
geekpete / Gemfile
Created October 6, 2016 06:33 — forked from jsvd/README.md
logstash grok filter benchmark script
source 'https://rubygems.org'
# Specify your gem's dependencies in logstash-mass_effect.gemspec
gem "logstash-core", :path => "./logstash/logstash-core"
gem "logstash-core-event-java", :path => "./logstash/logstash-core-event-java"
gem "logstash-core-plugin-api", :path => "./logstash/logstash-core-plugin-api"
gem "logstash-filter-grok", :path => "./logstash-filter-grok"
gem "logstash-patterns-core", :path => "./logstash-patterns-core"
gem "benchmark-ips"