Skip to content

Instantly share code, notes, and snippets.

Taymindis Woon Taymindis

Block or report user

Report or block Taymindis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Taymindis
Taymindis / spdlog_stream_route_handler.cpp
Last active Jul 7, 2018
stream route handler with spdlog
View spdlog_stream_route_handler.cpp
#include <iostream>
#include <stream_rt_handler.h>
/*https://github.com/gabime/spdlog*/
#include "spdlog/spdlog.h"
/***Compile by ***/
/** cd build **/
/** g++ -DSPDLOG_FMT_PRINTF -std=c++11 ../sample_with_spdlog.cpp -lsrh -pthread **/
@Taymindis
Taymindis / nginx.conf
Last active May 3, 2018
Nginx-c-function sample nginx.conf
View nginx.conf
# nginx.conf
### link to your local path and call ###
server {
listen 8888;
...
ngx_http_c_func_link_lib "/path/to/your/libcfuntest.so";
...
...
location = /testCFunGreeting {
# if not variable specified, direct write response out
@Taymindis
Taymindis / get_param_key.c
Created Sep 18, 2017
Get ParamKey From URL Query String, this is derived from https://github.com/Taymindis/fcgi-function
View get_param_key.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int strpos(const char *haystack, const char *needle)
{
char *p = strstr(haystack, needle);
if (p)
return p - haystack;
@Taymindis
Taymindis / multithread_test_zone.c
Created Sep 15, 2017
MultiThreading read and write for Hazard Pointer Logic in C
View multithread_test_zone.c
#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
#include <string.h>
#define THREAD_RUN 100
typedef struct $
{
char s[50];
} concurrent_update;
@Taymindis
Taymindis / socket.c
Created Aug 30, 2016 — forked from nolim1t/socket.c
HTTP Request in C using low level write to socket functionality
View socket.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
You can’t perform that action at this time.