Skip to content

Instantly share code, notes, and snippets.

View daemondev's full-sized avatar

Richar Muñico Samaniego daemondev

View GitHub Profile
@daemondev
daemondev / libwebsockets-webserver.c
Created July 23, 2018 11:48 — forked from martinsik/libwebsockets-webserver.c
Simple webserver based on libwebsockets library. Read full description at http://martinsikora.com/libwebsockets-simple-http-server
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <libwebsockets.h>
static int callback_http(struct libwebsocket_context *context,
struct libwebsocket *wsi,
enum libwebsocket_callback_reasons reason, void *user,
@daemondev
daemondev / re_replace.h
Created July 20, 2018 08:57 — forked from tanbro/re_replace.h
str replace and regex replace functions in C language
#ifndef __RE_REPLACE__
#define __RE_REPLACE__
#include <string.h>
#include <regex.h>
#ifdef __cplusplus
extern "C" {
#endif
@daemondev
daemondev / client.c
Created July 15, 2018 06:12 — forked from MaxySpark/client.c
Socket Programming
/****************** SERVER CODE ****************/
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>
#include <arpa/inet.h>
int main(){
int welcomeSocket, newSocket;
# CentOS-Vault.repo
#
# CentOS Vault holds packages from previous releases within the same CentOS Version
# these are packages obsoleted by the current release and should usually not
# be used in production
#-----------------
[C6.0-base]
name=CentOS-6.0 - Base
baseurl=http://vault.centos.org/6.0/os/$basearch/