Skip to content

Instantly share code, notes, and snippets.


Kirill Chernakov Kiryous

View GitHub Profile
View stale.yml
# Put it to .github/workflows/stale.yml
name: Close stale issues and pull requests
- cron: '30 1 * * *'
StarpTech / redis-cache-service.js
Last active April 15, 2021 16:26
Simple Redis Cache Client for Node.js
View redis-cache-service.js
'use strict';
const assert = require('assert');
* The redis client is
const redisClient = new Redis({
typpo / async analytics.js
Created August 5, 2017 20:05
MIT License
View async analytics.js
// Create a queue to push events and stub all methods || ( = {});
window.analytics_queue || (window.analytics_queue = []);
(function() {
var methods = ['identify', 'track', 'trackLink', 'trackForm', 'trackClick', 'trackSubmit', 'page', 'pageview', 'ab', 'alias', 'ready', 'group', 'on', 'once', 'off'];
var factory = function(method) {
return function () {
var args =;
wolever /
Created November 4, 2016 22:38
A task debouncer for Celery.
import time
import redis
def get_redis_connection():
return redis.connect()
class TaskDebouncer(object):
""" A simple Celery task debouncer.
cure53 /
Last active April 23, 2023 17:43
The Scriptless Scriptlet - Or how to execute JavaScript from CSS in MSIE11 without using Scripts

The Scriptless Scriptlet

Or how to execute JavaScript from CSS in MSIE11 without using Scripts

Stop! This text is only interesting for you if you...

  • Like popping alerts in weird situations
  • Miss CSS expressions as much as we do
  • Have an unhealthy obsession for markup porn


ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
View gist:b602ab436ac9f05660d9c15190f4fd7b
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
pardo /
Last active December 19, 2022 15:41
Debounced celery task in python
def debounced_wrap(func):
def wrapper(*args, **kwargs):
key = kwargs.pop("key") # it's required
call_count = kwargs.pop("call_count", 1)
count = cache.get(key, 1)
if count > call_count:
# someone called the function again before the this was executed
return None
# I'm the last call
walkermatt /
Created June 4, 2012 21:44
A debounce function decorator in Python similar to the one in underscore.js, tested with 2.7
from threading import Timer
def debounce(wait):
""" Decorator that will postpone a functions
execution until after wait seconds
have elapsed since the last time it was invoked. """
def decorator(fn):
def debounced(*args, **kwargs):
def call_it():