Skip to content

Instantly share code, notes, and snippets.

@teoruiz
teoruiz / migrate-redis.py
Created June 30, 2017 15:01 — forked from thomasst/migrate-redis.py
Migrate Redis data on Amazon ElastiCache
"""
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.
Requires Redis 2.8.0 or higher.

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@teoruiz
teoruiz / nginx.conf
Last active August 29, 2015 14:08 — forked from jrom/nginx.conf
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";