Skip to content

Instantly share code, notes, and snippets.

View mrb0y's full-sized avatar

Matt Miano mrb0y

View GitHub Profile
@mrb0y
mrb0y / TCPTestClient.cs
Created January 2, 2022 00:54 — forked from danielbierwirth/TCPTestClient.cs
TCP Client-Server Connection Example | Unity | C# | Bidirectional communication sample: Client can connect to server; Client can send and receive messages: Server accepts clients; Server reads client messages; Server sends messages to client
using System;
using System.Collections;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using UnityEngine;
public class TCPTestClient : MonoBehaviour {
#region private members
@mrb0y
mrb0y / Transparent.cpp
Created December 4, 2021 20:11 — forked from texus/Transparent.cpp
Translucent per-pixel alpha window on Windows
#include <SFML/Graphics.hpp>
#if _WIN32_WINNT < 0x0501
#define _WIN32_WINNT 0x0501
#endif
#include <windows.h>
// Set part of the window that can be clicked by removing fully transparent pixels from the region
void setShape(HWND hWnd, const sf::Image& image)
{
#include "mbed.h"
Serial pc(USBTX,USBRX);
DigitalInOut pingPin(p18);
Timer tmr;
long microsecondsToInches(long microseconds);
long microsecondsToCentimeters(long microseconds);