Skip to content

Instantly share code, notes, and snippets.

View Taymindis's full-sized avatar
🏠
Working from home

Taymindis Woon Taymindis

🏠
Working from home
View GitHub Profile
@Taymindis
Taymindis / my.ini
Created July 3, 2021 03:31
mysql my.ini for 5.7.34
# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
@Taymindis
Taymindis / install_nginx_macos_source.md
Created February 25, 2021 03:19 — forked from beatfactor/install_nginx_macos_source.md
Install Nginx on Mac OS from source (without brew)

Install Nginx on Mac OS from source

no Homebrew required

1. Download Nginx

$ cd /usr/local/src
$ curl -OL http://nginx.org/download/nginx-1.12.2.tar.gz
$ tar -xvzf nginx-1.12.2.tar.gz && rm nginx-1.12.2.tar.gz
@Taymindis
Taymindis / ReactSelectTree.md
Last active May 31, 2020 06:28
It's react-select library with tree options
@Taymindis
Taymindis / spdlog_stream_route_handler.cpp
Last active July 7, 2018 03:46
stream route handler with spdlog
#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 03:55
Nginx-c-function sample 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 September 18, 2017 03:30
Get ParamKey From URL Query String, this is derived from https://github.com/Taymindis/fcgi-function
#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 September 15, 2017 01:56
MultiThreading read and write for Hazard Pointer Logic in 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 August 30, 2016 07:03 — forked from nolim1t/socket.c
HTTP Request in C using low level write to socket functionality
#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>