Skip to content

Instantly share code, notes, and snippets.

View kYroL01's full-sized avatar
🥊

Michele Campus kYroL01

🥊
View GitHub Profile
@kYroL01
kYroL01 / tcp_client.c
Created February 17, 2021 11:08 — forked from teraPacket/tcp_client.c
example TCP client using libuv (version 1.0)
#include <stdio.h>
#include <stdlib.h>
#include <uv.h>
//based on https://gist.githubusercontent.com/snatchev/5255976/
//raw/8392c42d719bb775053036e32b21affdf932c1b7/libuv-tcp-client.c
//which was based on libuv 0.1, there is considerable difference there.
static void on_close(uv_handle_t* handle);
static void on_connect(uv_connect_t* req, int status);
static void on_write(uv_write_t* req, int status);
@kYroL01
kYroL01 / server.php
Created July 25, 2020 15:26 — forked from BenMorel/server.php
(Medium) Sample PHP server
<?php
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_bind($sock, '0.0.0.0', 10000);
for (;;) {
socket_recvfrom($sock, $message, 1024, 0, $ip, $port);
$reply = str_rot13($message);
socket_sendto($sock, $reply, strlen($reply), 0, $ip, $port);
}
@kYroL01
kYroL01 / curl.md
Last active November 24, 2020 17:21 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@kYroL01
kYroL01 / HashTable.cpp
Last active August 29, 2015 14:25 — forked from Karlina-Bytes/HashTable.cpp
Hash Table Example
//*****************************************************************
// HashTable.cpp
// HashTable
//
// Created by Kar Beringer on June 18, 2014.
//
// This header file contains the Hash Table class definition.
// Hash Table array elements consist of Linked List objects.
//*****************************************************************