Skip to content

Instantly share code, notes, and snippets.

View vivekhub's full-sized avatar

Vivek Venugopalan vivekhub

View GitHub Profile
@vivekhub
vivekhub / slack_handler.py
Created September 23, 2021 04:04 — forked from blakev/slack_handler.py
Python logging handler for publishing to a slack channel.
import os
import time
import json
import socket
import logging
from slacker import Slacker, Error as SlackerError
class SlackChannelHandler(logging.Handler):
@vivekhub
vivekhub / pyproject.toml
Created June 8, 2021 08:59
Poetry with MKdocs
[tool.poetry]
name = "mkdocs"
version = "0.1.0"
description = ""
authors = ["Vivek Venugopalan <[email protected]>"]
[tool.poetry.dependencies]
python = "^3.8"
mkdocs = "^1.2"
@vivekhub
vivekhub / mdel.lua
Created November 1, 2014 10:49
Implementing MDEL in Redis
--!/usr/bin/env lua
local delpattern = KEYS[1]
local count = 0
local valuelist = redis.call('keys', delpattern)
if valuelist then
for i = 1, #valuelist do
redis.call('del', valuelist[i])
count = count + 1
end