This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -ne "\033]0;${1}\007" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Syslog", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"query": "severity=info", | |
"alias": "", | |
"color": "#7EB26D", | |
"id": 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
# nagios configuration | |
define contact { | |
contact_name slack | |
alias Slack | |
service_notification_period 24x7 | |
host_notification_period 24x7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
$ ./export_confulence_space.py -l http://wiki.some.com -u username -p password -s SPACEKEY | |
$ ./export_confulence_space.py -l http://wiki.some.com -u username -p password -a # all spaces available for given user | |
""" | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION object_notify() RETURNS trigger AS $$ | |
DECLARE | |
BEGIN | |
PERFORM pg_notify('object_updated',CAST(NEW.id AS text)); | |
RETURN NEW; | |
END; | |
$$ LANGUAGE plpgsql; | |
CREATE TRIGGER object_post_insert_notify AFTER UPDATE ON objects FOR EACH ROW EXECUTE PROCEDURE object_notify(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################# | |
# Configuration file for Let's Encrypt ACME Challenge location | |
# This file is already included in listen_xxx.conf files. | |
# Do NOT include it separately! | |
############################################################################# | |
# | |
# This config enables to access /.well-known/acme-challenge/xxxxxxxxxxx | |
# on all our sites (HTTP), including all subdomains. | |
# This is required by ACME Challenge (webroot authentication). | |
# You can check that this location is working by placing ping.txt here: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# list all running nginx virtual hosts on docker created using | |
# `https://github.com/jwilder/nginx-proxy` | |
docker inspect --format '{{ index (index .Config.Env) 1 }}' $(docker ps -q) | grep VIRTUAL_HOST | cut -d\= -f 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import decimal | |
from functools import total_ordering | |
from numbers import Real | |
class Context(object): | |
def __init__(self, **kwargs): | |
self.context = decimal.Context(**kwargs) | |
def __enter__(self): | |
with decimal.localcontext(self.context) as c: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abc import ABC, ABCMeta, abstractmethod | |
from collections import namedtuple | |
from itertools import count | |
PayloadFactory = namedtuple('PayloadFactory', [ | |
'good', 'created', 'queued', 'unchanged', 'requires_auth', | |
'permission_denied', 'not_found', 'invalid', 'error' | |
]) | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Generate cryptographically strong pseudo-random numbers suitable for | |
managing secrets such as account authentication, tokens, and similar. | |
See PEP 506 for more information. | |
https://www.python.org/dev/peps/pep-0506/ | |
""" | |
__all__ = ['choice', 'randbelow', 'randbits', 'SystemRandom', | |
'token_bytes', 'token_hex', 'token_urlsafe', |