Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Sébastien Blin AmarOk1412

💭
I may be slow to respond.
View GitHub Profile
@AmarOk1412
AmarOk1412 / config.json
Created May 6, 2017
A simple IRC/Ring Bridge
View config.json
{
"users": {
},
"debug": true,
"host": "irc.freenode.net",
"follow_all": {
},
"port": 6697,
"nick": "NICKNAME",
"ssl": true,
@AmarOk1412
AmarOk1412 / Dockerfile
Created Dec 15, 2017
Ring Dockerfile for ubuntu 17.10
View Dockerfile
# docker run --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --net host -it --privileged --device /dev/video0:/dev/video0 ring
FROM ubuntu:17.10
LABEL maintainer="Sébastien Blin <sebastien.blin@savoirfairelinux.com>"
# Install system tools needed
RUN apt-get update -y \
&& apt-get install git python3 -y
# Clone ring-project
View test.cpp
#include <opendht.h>
#include <vector>
int main()
{
dht::DhtRunner node;
// Launch a dht node on a new thread, using a
// generated RSA key pair, and listen on port 4222.
node.run(4222, dht::crypto::generateIdentity(), true);
View service.c
#include <stdio.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
#include <unistd.h>
#include <stdlib.h>
#include <service.h>
int compute(char part[12], int base) {
View connectx.patch
configure.ac | 39 +++++++++++++++++++++++++++++++++++++++
lib/system/fastopen.c | 4 ++--
2 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index e81ff8970..b25778a83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -127,6 +127,45 @@ case "$host" in
AC_MSG_CHECKING([whether the linker supports -Wl,-no_weak_imports])
View CVE-2016-10517
src/redis.c | 23 +++++++++++++++++++++++
src/redis.h | 1 +
2 files changed, 24 insertions(+)
diff --git a/src/redis.c b/src/redis.c
index 6fdc2f6..1ae1b8b 100644
--- a/src/redis.c
+++ b/src/redis.c
@@ -273,6 +273,8 @@ struct redisCommand redisCommandTable[] = {
{"pfcount",pfcountCommand,-2,"w",0,NULL,1,1,1,0,0},