Skip to content

Instantly share code, notes, and snippets.

@AdoHaha
AdoHaha / test_throttle.py
Last active May 7, 2016 06:17
A throttle function decorator in Python similar to the one in underscore.js, inspired by debounce decorator from: https://gist.github.com/walkermatt/2871026
#!/usr/bin/python
import unittest
import time
from throttle import throttle
class TestThrottle(unittest.TestCase):
@throttle(1)
def increment(self):
@AdoHaha
AdoHaha / gist:3829069
Created October 3, 2012 19:05
Dodawanie RSS do Google Readera
javascript:var b=document.body;var GR________bookmarklet_domain='http://www.google.pl';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.pl/reader/ui/subscribe-bookmarklet.js');void(b.appendChild(z));}else{location='http://www.google.com/reader/view/feed/'+encodeURIComponent(location.href)}