Skip to content

Instantly share code, notes, and snippets.

View rgs1's full-sized avatar
🎯
Focusing

Raúl Gutiérrez Segalés rgs1

🎯
Focusing
View GitHub Profile
diff --git a/ensure-zookeeper-env.sh b/ensure-zookeeper-env.sh
index 6717094..4ff33ba 100755
--- a/ensure-zookeeper-env.sh
+++ b/ensure-zookeeper-env.sh
@@ -7,7 +7,7 @@ set -e
HERE=`pwd`
ZOO_BASE_DIR="$HERE/zookeeper"
-ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION:-3.5.0-alpha}
+ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION:-3.5.4-beta}
#!/usr/bin/env python
import argparse
import random
import SocketServer
import threading
def get_params():
parser = argparse.ArgumentParser()
@rgs1
rgs1 / tcnative.diff
Created June 11, 2018 21:32
workaround broken boringssl
diff --git a/boringssl-static/pom.xml b/boringssl-static/pom.xml
index 5a7b1b7..23f66b0 100644
--- a/boringssl-static/pom.xml
+++ b/boringssl-static/pom.xml
@@ -62,7 +62,7 @@
<configuration>
<checkoutDirectory>${boringsslCheckoutDir}</checkoutDirectory>
<connectionType>developerConnection</connectionType>
- <developerConnectionUrl>scm:git:https://boringssl.googlesource.com/boringssl</developerConnectionUrl>
+ <developerConnectionUrl>scm:git:https://github.com/rgs1/boringssl.git</developerConnectionUrl>
request_closed = False
channel_closed = False
while True:
r, w, x = select.select([self.request, chan], [], [])
if self.request in r:
data = self.request.recv(10240)
if len(data) == 0:
request_closed = True
else:
chan.send(data)
request_closed = False
channel_closed = False
while True:
r, w, x = select.select([self.request, chan], [], [])
if self.request in r:
data = self.request.recv(10240)
if len(data) == 0:
request_closed = True
continue
chan.send(data)
class Foo(object):
@classmethod
def test(cls):
print cls
Foo.test()
$ pip install --user fusepy
$ mkdir origen
$ touch origen/a
$ mkdir destino
$ python loopback.py origen/ destino/ 2> /dev/null &
[1] 21959
$ ls origen/ destino/
destino/:
a
~/src/zk_shell (master) > ./ensure-zookeeper-env.sh python setup.py nosetests --with-coverage --cover-package=zk_shell
Already downloaded zookeeper 3.5.0-alpha to /home/rgs/src/zk_shell/zookeeper/3.5.0-alpha
running nosetests
running egg_info
writing requirements to zk_shell.egg-info/requires.txt
writing zk_shell.egg-info/PKG-INFO
writing top-level names to zk_shell.egg-info/top_level.txt
writing dependency_links to zk_shell.egg-info/dependency_links.txt
reading manifest file 'zk_shell.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
@rgs1
rgs1 / foo.c
Created January 14, 2018 19:38
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char **argv)
{
pid_t pid;
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import os
import sys
import time
import requests