I hereby claim:
- I am michael-grunder on github.
- I am grumi78 (https://keybase.io/grumi78) on keybase.
- I have a public key ASACOYfvMbIwlqVKmg4i7lGPZfkcFpn1ULis-cF2jfUXMQo
To claim this, I am signing this object:
| { | |
| cat /tmp/not.a.file # <-- executed | |
| really.bad.thing # <-- ALSO executed | |
| } || { # <-- Because it's in an || block | |
| echo "oh noes" # <-- error IS printed | |
| } | |
| { | |
| cat /tmp/not.a.file # <-- executed | |
| really.bad.thing # <-- not executed |
| PHP_REDIS_API void | |
| generic_mset_old(INTERNAL_FUNCTION_PARAMETERS, char *kw, ResultCallback fun) { | |
| zval *object; | |
| RedisSock *redis_sock; | |
| char *cmd = NULL, *p = NULL; | |
| int cmd_len = 0, argc = 0, kw_len = strlen(kw); | |
| int step = 0; // 0: compute size; 1: copy strings. | |
| zval *z_array; |
| PHP_REDIS_API | |
| void generic_mset(INTERNAL_FUNCTION_PARAMETERS, char *kw, ResultCallback fun) | |
| { | |
| RedisSock *redis_sock; | |
| smart_string cmd = {0}; | |
| zval *object, *z_array; | |
| HashTable *htargs; | |
| zend_string *zkey; | |
| zval *zmem; | |
| char buf[64]; |
I hereby claim:
To claim this, I am signing this object:
| #define psetIterNextSeg(it) do { it->seg++; it->idx = 0; } while(0) | |
| int psetForward(psetIterator *it, uint64_t n) { | |
| register uint32_t move; // <--- Using register here is 5% faster | |
| if (it->pos + n < it->ps->rows) { | |
| /* Jump whole segments */ | |
| while ( (move = psetIterSegLen(it) - it->idx) <= n) { | |
| it->pos += move; | |
| n -= move; |
| <?php | |
| $r = new Redis(); | |
| $r->connect('127.0.0.1', 6379); | |
| $rraw = new Redis(); | |
| $rraw->connect('127.0.0.1', 6379); | |
| $modes['php'] = Redis::SERIALIZER_PHP; | |
| if (defined('Redis::SERIALIZER_IGBINARY')) { |
| $ git clone https://github.com/nemequ/liblzf.git | |
| $ cd liblzf | |
| $ autoreconf -i | |
| $ touch install-sh | |
| $ ./configure | |
| $ make | |
| $ sudo make install |
| cthulu ➜ liblzf git:(master) ✗ gcc -c -Wall -Werror -fpic lzf.c lzf_c.c lzf_d.c | |
| cthulu ➜ liblzf git:(master) ✗ gcc -shared -o liblzf.so lzf_c.o lzf_d.o | |
| cthulu ➜ liblzf git:(master) ✗ sudo cp liblzf.so /usr/local/lib/ |
| #include <stdio.h> | |
| #include <hiredis/hiredis.h> | |
| #include <stdlib.h> | |
| long long ustime(void) { | |
| struct timeval tv; | |
| long long ust; | |
| gettimeofday(&tv, NULL); | |
| ust = ((long long)tv.tv_sec)*1000000; |
| standalone,set,100000,1.6747,59713 | |
| standalone,get,100000,1.5076,66330 | |
| standalone,set,100000,2.2147,45152 | |
| standalone,get,100000,1.6861,59308 | |
| standalone,set,100000,1.6789,59561 | |
| standalone,get,100000,1.5360,65105 | |
| standalone,set,100000,1.7805,56163 | |
| standalone,get,100000,1.5389,64980 | |
| standalone,set,100000,1.7051,58646 | |
| standalone,get,100000,1.6017,62432 |