Skip to content

Instantly share code, notes, and snippets.

View rdeioris's full-sized avatar

Roberto De Ioris rdeioris

View GitHub Profile
#include <aiv_opengl.h>
#include <stdio.h>
#include <stdlib.h>
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
aiv_opengl_context_t context;
GLuint aiv_compile_shader(char *, char *);
@rdeioris
rdeioris / Server.cs
Created January 29, 2018 17:33
Non blocking Poll based (slow) server
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Net.Sockets;
using System.IO;
namespace HttpConcurrentServer
@rdeioris
rdeioris / Server.cs
Last active January 29, 2018 18:51
Non blocking Select based server
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Net.Sockets;
using System.IO;
namespace HttpConcurrentServer
using UnityEngine;
using UnityEngine.TestTools;
using NUnit.Framework;
using System.Collections;
[Category("Components")]
public class PlayerGoesUpTest {
GameObject newGameObject;
#include <thread>
#include <mutex>
#include <iostream>
#include <list>
#include <condition_variable>
std::mutex mutex;
std::condition_variable cond_var;
thread_local int foo;
#define _CRT_SECURE_NO_WARNINGS
#include <string>
#include <iostream>
#include <steam_api.h>
class FollowerRetriever
{
public:
void GetFollowersCount()
{
#define _CRT_SECURE_NO_WARNINGS
#include <string>
#include <iostream>
#include <steam_api.h>
class FollowerRetriever
{
public:
void GetFollowersCount()
{
System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Steamworks;
using Aiv.Fast2D;
namespace SteamIntegration
{
SteamAPICall_t asyncCall = SteamFriends.JoinClanChatRoom(CSteamID.Nil);
CallResult<JoinClanChatRoomCompletionResult_t> joinCallback = CallResult<JoinClanChatRoomCompletionResult_t>.Create(
(callback, ioBool) =>
{
Debug.Log("clan joined");
}
);
joinCallback.Set(asyncCall);
#include <iostream>
#include <string>
#include <PxPhysicsAPI.h>
using namespace physx;
int main(int argc, char** argv)
{
PxDefaultAllocator allocator;
PxDefaultErrorCallback error_callback;