Skip to content

Instantly share code, notes, and snippets.

2025-06-13 16:10:40.399 INFO [34356] [rtc::impl::IceTransport::IceTransport@113] Using STUN server "stun.l.google.com:19302"
2025-06-13 16:10:40.402 INFO [34356] [rtc::impl::PeerConnection::changeSignalingState@1363] Changed signaling state to have-local-offer
peerconnection onSignalingStateChange: 2025-06-13 16:10:40.403 INFO [34356] [rtc::impl::PeerConnection::changeGatheringState@1350] Changed gathering state to in-progress
have-local-offer
2025-06-13 16:10:40.403 INFO [34356] [rtc::impl::IceTransport::LogCallback@390] juice: agent.c:1157: Changing state to gathering
ICE Gathering State: in-progress
2025-06-13 16:10:40.405 INFO [34356] [rtc::impl::IceTransport::LogCallback@390] juice: agent.c:1157: Changing state to connecting
2025-06-13 16:10:40.405 INFO [34356] [rtc::impl::PeerConnection::changeIceState@1332] Changed ICE state to checking
@patrickatkeylogic
patrickatkeylogic / main.cpp
Last active June 13, 2025 20:10
Simple RTC camera test
#include <curl/curl.h>
#include <iostream>
#include <rtc/rtc.hpp>
#include <thread>
#include <nlohmann/json.hpp>
using nlohmann::json;
size_t writeCallback(void* contents, size_t size, size_t nmemb, std::string* output)
{
@patrickatkeylogic
patrickatkeylogic / crypto-pbkdf2-example.js
Created July 22, 2022 15:26 — forked from skeggse/crypto-pbkdf2-example.js
Example of using crypto.pbkdf2 to hash and verify passwords asynchronously, while storing the hash and salt in a single combined buffer along with the original hash settings
var crypto = require('crypto');
// larger numbers mean better security, less
var config = {
// size of the generated hash
hashBytes: 32,
// larger salt means hashed passwords are more resistant to rainbow table, but
// you get diminishing returns pretty fast
saltBytes: 16,
// more iterations means an attacker has to take longer to brute force an
@patrickatkeylogic
patrickatkeylogic / bno.ino
Created May 14, 2021 17:21
Working with multiple BNO055 chips on a single I2C line
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BNO055.h>
#include <utility/imumaths.h>
Adafruit_BNO055 bno = Adafruit_BNO055(1, 0x28);
Adafruit_BNO055 bno2 = Adafruit_BNO055(2, 0x28);
void setup()
{