This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use 5.010; | |
use Crypt::CBC; | |
my $cbc = Crypt::CBC->new({ | |
key => 'xxxxxxxxxxxxxxxx', | |
keysize => 16, | |
literal_key => 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <sys/stat.h> | |
#include <event.h> | |
#include <evhttp.h> | |
#define HTTPD_ADDR "0.0.0.0" | |
#define HTTPD_PORT 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Text::VimColor; | |
my %ft_table = ( | |
pl => 'perl', | |
cgi => 'perl', | |
psgi => 'perl', | |
c => 'c', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <sys/stat.h> | |
#include <event.h> | |
#include <evhttp.h> | |
#define HTTPD_ADDR "0.0.0.0" | |
#define HTTPD_PORT 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <event.h> | |
#include <evhttp.h> | |
#define HTTPD_ADDR "0.0.0.0" | |
#define HTTPD_PORT 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <event.h> | |
#include <evhttp.h> | |
#define HTTPD_ADDR "0.0.0.0" | |
#define HTTPD_PORT 8080 | |
void req_handler(struct evhttp_request *r, void *arg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(echo_server). | |
-export([run/0]). | |
-author('mythosil'). | |
-define(PORT, 1986). | |
-define(TCP_OPTIONS, [binary, {packet, 0}, {active, false}, {reuseaddr, true}]). | |
run() -> | |
Listener = listen(), | |
accept_loop(Listener). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <sys/time.h> | |
#include <event.h> | |
void say_hello(int fd, short event, void *arg) | |
{ | |
printf("Hello\n"); | |
} | |
int main(int argc, const char* argv[]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <event.h> | |
#define PORT 1986 | |
#define BACKLOG -1 | |
#define BUFSIZE 256 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <arpa/inet.h> | |
#include <unistd.h> | |
#include <errno.h> | |
using namespace std; | |
int setup_listener() | |
{ |