Skip to content

Instantly share code, notes, and snippets.

View metamatik's full-sized avatar

Mathieu Richardoz metamatik

  • Paris, France
  • 21:43 (UTC +02:00)
View GitHub Profile
@metamatik
metamatik / migrate-redis.py
Last active March 25, 2020 10:41 — forked from kitwalker12/migrate-redis.py
Migrate Redis data on Amazon ElastiCache
"""
Forked and heavily adappted from:
https://gist.github.com/kitwalker12/517d99c3835975ad4d1718d28a63553e
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
@metamatik
metamatik / gist:5270253
Created March 29, 2013 11:15
magopian t'apprend l'encodage
<magopian> m'en fou je suis en passe de finir le portage de IMAPClient vers python3
<magopian> c'est kiffant l'open source quand même
<mrjmad> :)
<mrjmad> putain je sais pas quand je vais commencer a m'y mettre a py3 bordel
<Linovia> d'ailleurs, qui a commencé à vraiment utiliser python3 ?
<mrjmad> tu tentes aussi le django en py3 magopian ?
<mrjmad> Linovia, moi j'ai mis dans ma todo list 'comprendre comment faire du py3 ' :)
<Linovia> mrjmad: oO
<mrjmad> (par la je veux dire, comprendre toutes les modifs entre les 2 versions, etre capable de savoir exactement les points d'achoppement dans une migration 2.7 -> 3, etre capable de 'penser' en 3.X , etc .. )
<mrjmad> ( je suis encore très light sur pas mal de sujet, genre le utf8 tout ca , pour me dire avec sérénité que je peux faire des migrations 2.7 -> 3.X )
@metamatik
metamatik / gist:1235556
Created September 22, 2011 18:18
zipping the pigeon
### pigeon_push.py
# (...)
class Command(BaseCommand):
"""Push items in the ItemToPush queue."""
help = __doc__
def handle(self, *args, **options):