Created
May 7, 2010 14:32
-
-
Save horatio-sans-serif/393489 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
They both write the same value when the node script uses a Buffer. | |
~/Downloads/2010-05-07/compatibility_issue ⚡ redis-cli flushall | |
OK | |
~/Downloads/2010-05-07/compatibility_issue ⚡ !node | |
node write_file_to_redis.js 2> output.node | |
~/Downloads/2010-05-07/compatibility_issue ⚡ redis-cli get test_key | |
"\x1f\x8b\b\b\x80\xce\xe3K\x00\x03testfile.txt\x00\x0b\xc9\xc8,V\x00\xa2\xe2\xfc\xdcT\x85\x94\xc4\x92D\x85\x92\x8c\xc4\x12\x90Hz~f^\xbaBI\xbeBR\xaaBr~nAQjqqj\n\x17\x00\xc8\xcerT1\x00\x00\x00" | |
~/Downloads/2010-05-07/compatibility_issue ⚡ !python | |
python write_file_to_redis.py > output.python | |
~/Downloads/2010-05-07/compatibility_issue ⚡ redis-cli get test_key | |
"\x1f\x8b\b\b\x80\xce\xe3K\x00\x03testfile.txt\x00\x0b\xc9\xc8,V\x00\xa2\xe2\xfc\xdcT\x85\x94\xc4\x92D\x85\x92\x8c\xc4\x12\x90Hz~f^\xbaBI\xbeBR\xaaBr~nAQjqqj\n\x17\x00\xc8\xcerT1\x00\x00\x00" | |
~/Downloads/2010-05-07/compatibility_issue ⚡ diff output | |
output.node output.python | |
~/Downloads/2010-05-07/compatibility_issue ⚡ diff output.* | |
~/Downloads/2010-05-07/compatibility_issue ⚡ echo $? | |
0 | |
This file contains hidden or 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
with some changes, it works the same for binary strings: | |
~/Downloads/2010-05-07/compatibility_issue ⚡ redis-cli flushall | |
OK | |
~/Downloads/2010-05-07/compatibility_issue ⚡ node write_file_to_redis.js | |
len = 78 | |
~/Downloads/2010-05-07/compatibility_issue ⚡ redis-cli get test_key > a | |
~/Downloads/2010-05-07/compatibility_issue ⚡ python write_file_to_redis.py > output.python | |
~/Downloads/2010-05-07/compatibility_issue ⚡ redis-cli get test_key > b | |
~/Downloads/2010-05-07/compatibility_issue ⚡ diff a b | |
~/Downloads/2010-05-07/compatibility_issue ⚡ echo $? | |
0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment