Skip to content

Instantly share code, notes, and snippets.

@bittenApple
bittenApple / memcached.sh
Last active August 29, 2015 14:07
CentOS memcached multiple instances init script
#! /bin/sh
#
# chkconfig: - 55 45
# description: The memcached daemon is a network memory cache service.
# processname: memcached
# pidfile: /var/run/memcached/memcached_*.pid
# Standard LSB functions
#. /lib/lsb/init-functions
@bittenApple
bittenApple / beanstalkd
Last active March 5, 2018 00:06 — forked from shiki/beanstalkd
#!/bin/sh
#
# beanstalkd - a simple, fast workqueue service
#
# chkconfig: - 57 47
# description: a simple, fast workqueue service
# processname: beanstalkd
# config: /etc/sysconfig/beanstalkd
#
@bittenApple
bittenApple / epoll_server.c
Created February 16, 2019 17:44
Epoll Example
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/epoll.h>
#include <errno.h>
@bittenApple
bittenApple / epoll_server_example.c
Last active February 16, 2019 17:45
Epoll Example
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/epoll.h>
#include <errno.h>