Skip to content

Instantly share code, notes, and snippets.

@Karsten1987
Karsten1987 / 00_cross_compile_on_osx.md
Last active November 24, 2021 12:50
cross-compile on OSX

Cross Compile with OSX as a host

compile crosstool-ng

One debian systems, there are pre-compiled toolchains, for OSX however they have to be built from scratch. A decent tool for creating such toolchains is crosstool-ng.

Compilation Note there's a problem with having ncurses installed via homebrew. Add the libs and include paths to LDFLAGS/CXXFLAGS before the configure step For python problems on gdb, see https://stackoverflow.com/a/11600411/4583130

@mattyellen
mattyellen / UnityAsyncOperationAwaiter.cs
Created July 26, 2020 19:36
Allows the use of async/await (instead of yield) with any Unity AsyncOperation
public static class ExtensionMethods
{
public static TaskAwaiter GetAwaiter(this AsyncOperation asyncOp)
{
var tcs = new TaskCompletionSource<object>();
asyncOp.completed += obj => { tcs.SetResult(null); };
return ((Task)tcs.Task).GetAwaiter();
}
}
@zdxerr
zdxerr / server.py
Created June 1, 2020 17:11
Python ThreadingHTTPServer Example
from http.server import ThreadingHTTPServer, SimpleHTTPRequestHandler
def run(server_class=ThreadingHTTPServer, handler_class=SimpleHTTPRequestHandler):
server_address = ('', 80)
httpd = server_class(server_address, handler_class)
httpd.serve_forever()
if __name__ == "__main__":
@bartmika
bartmika / raspberry-pi-serial-communication-using-adafruit-bluetooth-le-friend-usb.md
Last active December 16, 2022 06:20
Raspberry Pi Serial Communication over Bluetooth LE using Adafruit Bluefruit LE Friend for Python Programming

Raspberry Pi Serial Communication over Bluetooth LE using Adafruit Bluefruit LE Friend for Python Programming

Do you want to use the bluetooth interface for a Python programming project but you don't want to deal with the complexity involving bluetooth? This guide will help you.

The purpose of this guide is to demonstrate how to do write a program in Python which will do serial communication over Bluetooth for the Raspberry Pi.

The Adafruit Bluefruit LE Friend has FDTI chipset that works out of the box on Raspberry Pi which is useful for simplicity. (1)

This guide assumes you've just setup Rasbpian and have done nothing else.

Instructions

@xavierfoucrier
xavierfoucrier / gpg-signing.md
Last active April 24, 2025 11:07
GPG signing with Git and Github Desktop

GPG signing – git github-desktop

Here is a short guide that will help you setup your environment to create signed commits or signed tags with Git locally. This has been extensively tested on Windows with Git and the Github Desktop application: I use it every day for my professional development projects.

I you face any issue, feel free to leave a comment below.

Summary

  1. Sign commits or tags
  2. Key passphrase
  3. Disable signatures
  4. Renew a GPG key
@R-WebsterNoble
R-WebsterNoble / SavWav.cs
Last active November 8, 2024 02:15 — forked from darktable/SavWav.cs
Unity3D: script to save an AudioClip as a .wav file.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
@tobiasfriden
tobiasfriden / Dockerfile
Last active December 23, 2024 03:50
Gstreamer WebRTC python demo working Dockerfile
FROM maxmcd/gstreamer:1.14-buster
WORKDIR /usr/src
RUN apt-get update && apt-get install -y python3-pip \
pkg-config \
libcairo2-dev \
gcc \
python3-dev \
libgirepository1.0-dev \
@danielbierwirth
danielbierwirth / TCPTestClient.cs
Last active August 17, 2024 07:19
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
// This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/
// or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using UnityEngine;
@tanyuan
tanyuan / unity-arduino-serial.md
Last active June 13, 2023 17:18
Unity writes Arduino via serial port

Unity Writes Arduino via Serial Port

Tap 1 0 keys in Unity will make Arduino LED light on/off.

Arduino

const int ledPin = 13;
int ledState = 0;
@waldobronchart
waldobronchart / UnityPlatformSwitcher.cs
Last active February 5, 2025 00:51
A simple fast platform switcher for Unity
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.IO;
public class PlatformSwitcher
{
[MenuItem("Platform/PC, Mac and Linux Standalone")]
static void SwitchPlatformToDesktop()
{