Skip to content

Instantly share code, notes, and snippets.

View vanyakosmos's full-sized avatar
🌑
suffering

Bachynin Ivan vanyakosmos

🌑
suffering
View GitHub Profile
@f41gh7
f41gh7 / victoria_metrics_push_gw.py
Created January 17, 2021 02:08
VictoriaMetrics as push gateway.
from prometheus_client import Counter, start_http_server
from threading import Thread
import requests as re
import time
JOB_NAME = 'test'
INSTANCE = 'localhost'
def scrape_and_send(local_url: str, vm_url: str, scrape_interval: int):
@maxfischer2781
maxfischer2781 / async_read.py
Last active April 30, 2024 06:40
example implementation for an async event loop
import time
import select
import socket
class AsyncSleep:
"""Event and action to sleep ``until`` a point in time"""
def __init__(self, until):
self.until = until
@andrewgross
andrewgross / travis_webhook_checker.py
Last active November 5, 2020 15:10
Django View to check travis CI webhook signatures. Requires Django, python-requests and pyOpenSSL packages
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import base64
import json
import logging
from urlparse import parse_qs
import requests
@parmentf
parmentf / GitCommitEmoji.md
Last active May 20, 2024 23:08
Git Commit message Emoji
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active May 1, 2024 23:17
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook