This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index 1c0e8fa..23b0d4a 100644 | |
--- a/redis/client.py | |
+++ b/redis/client.py | |
@@ -213,6 +213,7 @@ class Redis(threading.local): | |
string_keys_to_dict('ZRANGE ZRANGEBYSCORE ZREVRANGE', zset_score_pairs), | |
{ | |
'BGSAVE': lambda r: r == 'Background saving started', | |
+ 'BGREWRITEAOF': lambda r: r == 'Background rewriting of AOF file started', | |
'HGETALL': lambda r: r and pairs_to_dict(r) or None, | |
'INFO': parse_info, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
import Queue | |
q = Queue.Queue() | |
def worker(): | |
while True: | |
msg = q.get(block=True) | |
# do stuff with the message | |
t = threading.Thread(target=worker) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
# http://atomboy.isa-geek.com/plone/Members/acoil/programing/double-metaphone | |
from metaphone import dm as double_metaphone | |
# get the Redis connection | |
from jellybean.core import redis | |
import models | |
# Words which should not be indexed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Explanations : http://bit.ly/gs2qpL | |
# give optionnaly a revision from where to start | |
# if not given initial_ref will be the first ref available | |
initial_ref='757794e524755d2eebc6d881fea026c308a11fd5' | |
# declare below all the steps whith this format : | |
# 'version type name ref' \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document url-prefix("http://www.google.com/reader/view/"),url-prefix("https://www.google.com/reader/view/") | |
{ | |
#top-bar { | |
height: 28px !important; | |
} | |
#search { | |
padding: 0 !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
button.reset, input.reset { | |
border: none; | |
background: transparent; | |
cursor: pointer; | |
margin: 0; | |
padding: 0; | |
text-align: left; | |
border-radius: 0; | |
box-shadow: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def context2dict(context): | |
result = {} | |
for dic in reversed(context.dicts): | |
try: | |
result.update(dic) | |
except: | |
try: | |
result.update(context2dict(dic)) | |
except: | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# don't put duplicate lines in the history and ignore lines starting by space(s) | |
HISTCONTROL=ignoredups:ignorespace | |
# append to the history file, don't overwrite it | |
shopt -s histappend | |
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) | |
HISTSIZE=50000 | |
HISTFILESIZE=50000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A simple way to toggle the display of the sidebar AND the minimap, with only one key binding. | |
Put "toggle_sidebar_and_minimap.py" in ~/.config/sublime-text-2/Packages/ | |
and the content of "keymap" in your "Key bindings - User" file. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foobar |
OlderNewer