Skip to content

Instantly share code, notes, and snippets.

View bustardcelly's full-sized avatar
🏠
Working from home

Todd Anderson bustardcelly

🏠
Working from home
View GitHub Profile
@bustardcelly
bustardcelly / PubSubContainer.js
Created July 7, 2022 19:32
red5pro + reactjs
import { useEffect, useState } from 'react'
import {
RTCPublisher,
RTCSubscriber,
setLogLevel,
getRecordedLogs
} from 'red5pro-webrtc-sdk'
import { ReactComponent as LoadingIcon } from 'assets/img/svg/loading.svg'
import { wait } from 'utils'
import DialogLayout from 'layouts/DialogLayout/DialogLayout'
@bustardcelly
bustardcelly / get_token_id.js
Created April 8, 2021 11:29
Access token ID of OBJKT
async function getTokenId (account, date) {
try {
let response = await fetch(`https://staging.api.tzkt.io/v1/accounts/${account}/operations?type=transaction`, { method: 'GET' })
let json = await response.json()
const filter = json.filter(t => {
if (t.type === 'transaction') {
if (t.timestamp.match(date)) {
if (t.parameter && t.parameter.entrypoint === 'mint') {
return t
}
@bustardcelly
bustardcelly / Red5ProLive.java
Created December 12, 2017 22:12
Invoke on ApplicationAdapter Example
package com.infrared5.red5pro.live;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
package com.infrared5.red5pro.live;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.red5.server.adapter.MultiThreadedApplicationAdapter;
import org.red5.server.api.IConnection;
import org.red5.server.api.Red5;
// 1. Locate the WebRTC configuration on the webpage
// 2. Add the `iceServers` configuration property with the target STUN.
var rtcConfig = {
host: host,
streamName: streamName,
app: 'streammanager',
protocol: wsProtocol,
port: wsPort,
// Add this and replace the `urls` value with your target STUN server address.
@bustardcelly
bustardcelly / 1_System.md
Last active March 28, 2016 13:38
PiRadio Setup

system

  • Rasbian Jessie
  • 8G Memory
  • Ehternet plug to setup

SSH into the pi, then:

$ raspi-config
@bustardcelly
bustardcelly / instructions.md
Created January 6, 2016 20:41
Setup HostAP on RPi
  1. Manually setup per https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point/install-software
  2. Get latest driver for Edimax WiFi dongle from http://152.104.125.41/downloads/downloadsView.aspx?Langid=1&PNid=21&PFid=48&Level=5&Conn=4&ProdID=277&DownTypeID=3&GetDown=false&Downloads=true - search for the Linux version with a name similar to 0001-RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911
    1. Follow directions from the following to replace th hostapd: https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point/compiling-hostapd
  3. Use scripts from https://hackaday.io/project/4224/instructions

Explanation as to why need new driver: [https://forums.adafruit.com/viewtopic.php?f=19&t

@bustardcelly
bustardcelly / rpi-setup.md
Last active May 1, 2019 20:25
Basic Setup of Raspberry PI with WiFi Dongle
@bustardcelly
bustardcelly / browser.js
Created August 18, 2015 18:40
Process environment dependent exports
module.exports = "hello, browser!"