Skip to content

Instantly share code, notes, and snippets.

View vdudouyt's full-sized avatar

Valentin Dudouyt vdudouyt

  • Novosibirsk, Russia
View GitHub Profile
@vdudouyt
vdudouyt / chunk.c
Created June 10, 2014 15:10 — forked from rgl/chunk.c
/*
This shows how to use HTTP chunked transfer in libevent. It starts an HTTP server on port 8080; when the client connects, it outputs an message every second. After all messages are outputted, the server closes the HTTP connection.
It has an unsolved crashing problem though... to see it crash, run the next commands in a shell.
See my ML post "after the http client abruptly closes socket libevent (2.0.3-alpha) http server crashes" at http://archives.seul.org/libevent/users/Jan-2010/msg00054.html
Compile with:
gcc -Wall -g -std=c99 -D_GNU_SOURCE -Iinclude -Llib -levent -o chunk chunk.c
import scala.io.Source
val listOfLines = Source.fromFile("filename.txt").getLines.toList
@vdudouyt
vdudouyt / ckjv.bash
Created October 11, 2013 02:15 — forked from barce/ckjv.bash
#!/bin/bash
grep '[\x{4E00}-\x{9FBF}|\x{3040}-\x{309F}|\x{30A0}-\x{30FF}]' test.txt
From 7341a316c38a61cc745ce04e618916677007883b Mon Sep 17 00:00:00 2001
From: Timothy Brom <thb@timbrom.com>
Date: Wed, 29 Feb 2012 11:29:55 -0500
Subject: [PATCH] Fixed error about strexh and strexb using the same register
---
example/libs_stm/inc/core_support/core_cm3.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/example/libs_stm/inc/core_support/core_cm3.c b/example/libs_stm/inc/core_support/core_cm3.c

Section

aaa

Subsection

  • item1
  • item2