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
| # Put it to .github/workflows/stale.yml | |
| name: Close stale issues and pull requests | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '30 1 * * *' | |
| jobs: | |
| stale: |
| 'use strict'; | |
| const assert = require('assert'); | |
| /** | |
| * The redis client is https://github.com/luin/ioredis | |
| */ | |
| /* | |
| const redisClient = new Redis({ |
| // Create a queue to push events and stub all methods | |
| window.analytics || (window.analytics = {}); | |
| 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 = Array.prototype.slice.call(arguments); | |
| args.unshift(method); |
| import time | |
| import redis | |
| def get_redis_connection(): | |
| return redis.connect() | |
| class TaskDebouncer(object): | |
| """ A simple Celery task debouncer. |
| // Add on element with overflow | |
| -webkit-mask-image: -webkit-radial-gradient(white, black); |
| def debounced_wrap(func): | |
| @functools.wraps(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 |
| 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(): |