Skip to content

Instantly share code, notes, and snippets.

@manute
manute / gist:8852537
Last active September 2, 2016 15:41
Riemann Service Down Alerts
;
; Riemann Service Down Alerts
; ===================================================
;
; The index stores the most recent state for any [host, service] pair. Clients
; can search the index for various states with a basic query language. The
; default implementation is a NonBlockingHashMap.
;
(let [my-index (index)
@kkung
kkung / example.md
Last active September 22, 2017 14:24
Getting AWS RDS Log files
$ python get_logs.py rds-db-instance-name rds.log aws-access-key aws-secret-key
$ ./pgbadger -p '%t:%r:%u@%d:[%p]:' ./rds.log

$ open out.html

@KonradIT
KonradIT / readme.md
Last active June 12, 2025 10:51
GoPro Studio for Linux
@aeris
aeris / privacy.sieve
Last active March 6, 2017 19:49
Sieve filter for privacy
# Licence : AGPLv3+
# rule:[Privacy]
if anyof (
address :is :domain "From" "gmail.com",
address :is :domain "From" "live.com",
address :is :domain "From" "msn.com",
address :is :domain "From" "hotmail.com",
address :is :domain "From" "hotmail.fr",
address :is :domain "From" "yahoo.com",
address :is :domain "From" "yahoo.fr"
vagrant@precise64:~$ irb
1.9.3-p484 :002 > require "riemann"
=> true
# Activate maintenance-mode:
1.9.3-p484 :010 > Riemann::Client.new << {service: "maintenance-mode", host: "precise64", state: "active", ttl: Float::INFINITY}
=> nil
# Deactivate maintenance-mode:
1.9.3-p484 :011 > Riemann::Client.new << {service: "maintenance-mode", host: "precise64", state: nil, ttl: Float::INFINITY}
=> nil
@daviddyball
daviddyball / IAM_Role.json
Last active July 25, 2021 05:39
EC2 Metadata Script to Load a bootstrap script from S3 based on EC2 Tag Definitions
{
"Statement": [
{
"Sid": "EC2DescribeInstances",
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ec2:DescribeTags"
],
"Resource": [
@mmdriley
mmdriley / registry_api_v1.md
Last active April 15, 2019 14:57
Docker Registry API walkthrough

Docker Registry API V1 walkthrough

Matthew Riley ([email protected])

This document summarizes the interactions between the Docker client and the Docker Hub during push and pull commands through version 1 of the registry API. It was compiled to aid in writing a compatible registry server implementation after the existing API documentation proved occasionally incomplete or inaccurate.

Behavior and code links were as of Docker v1.2.0.

docker {push|pull} H:P/R[:T]
Host, Port, Repository ([namespace/]image), Tag

@xaprb
xaprb / backup_github.sh
Created March 7, 2015 13:59
Shell script to back up all of an organization's GitHub repos
#!/bin/sh
LOGIN=YOURLOGIN
TOKEN=YOURTOKEN
ORG=YOURORG
DONE=0
PAGE=0
# sample output:
# "total_private_repos": 50,
@herusdianto
herusdianto / progress_second.html
Last active January 9, 2017 19:44
Progress Bar Every Second
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Progress Bar Every Second</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script will delete all of the tweets in the specified account.
You may need to hit the "more" button on the bottom of your twitter profile
page every now and then as the script runs, this is due to a bug in twitter.
You will need to get a consumer key and consumer secret token to use this
script, you can do so by registering a twitter application at https://dev.twitter.com/apps