Skip to content

Instantly share code, notes, and snippets.

@robterrell
robterrell / aqi.py
Last active August 26, 2020 01:50
Air quality meter for M5Stack ESP32 and Nova PM particle sensor. Connect the Nova sensor +5V and Ground pins to Port B. Connect the Tx and Rx lines to Port A lins 36/37. (If you use Port B, the M5Stack won't boot -- it uses those pins for PSRam.)
from m5stack import *
from m5ui import *
from uiflow import *
import unit
import machine
from machine import I2C
import utime
from m5stack import timEx
import math
[Address Resolver] Host provided as query parameter.
red5prosdk.setLogLevel('debug')
undefined
r5pro-subscriber-failover.js:219 [subscriber]:: Configuration
{
"rtc": {
"host": "34.209.44.76",
"app": "live",
"buffer": 2,
"iceServers": [
[ec2-user@ip-10-198-217-121 ~]$ tail /usr/local/red5pro/log/*
==> /usr/local/red5pro/log/0.0.0.0_access..2018-03-27.log <==
52.25.25.134 - - [27/Mar/2018:20:40:02 +0000] "POST /cluster/api?action=removesubscribers&timestamp=1522183202096&signature=bc123c0a858311fdf1524fa2920a6a5e7d690d8e6daf86ccb35cfe82b38b22 HTTP/1.1" 200 56
52.25.25.134 - - [27/Mar/2018:20:46:40 +0000] "POST /cluster/api?action=removesubscribers&timestamp=1522183600557&signature=87e7beac87ea91c1ee6a54a749d48c1b58901d644b8931e7fe076560c2337b HTTP/1.1" 200 56
52.25.25.134 - - [27/Mar/2018:20:47:21 +0000] "POST /cluster/api?action=removesubscribers&timestamp=1522183641156&signature=3ad6fcc490f2b47a8dae63cdcdc73c5f311314cfaaa76ede7eb3abbf8ff28 HTTP/1.1" 200 56
52.25.25.134 - - [27/Mar/2018:20:52:23 +0000] "POST /cluster/api?action=removesubscribers&timestamp=1522183943537&signature=8fb4a3881f9ca88d83d266b996916952656083c5f8905aacc1f13347dcd536f HTTP/1.1" 200 56
199.48.105.34 - - [27/Mar/2018:21:05:57 +0000] "GET /favicon.ico HTTP/1.1" 200 1150
#import <UIKit/UIKit.h>
#import <ImageIO/ImageIO.h>
#import <MobileCoreServices/MobileCoreServices.h>
static UIImage *frameImage(CGSize size, CGFloat radians) {
UIGraphicsBeginImageContextWithOptions(size, YES, 1); {
[[UIColor whiteColor] setFill];
UIRectFill(CGRectInfinite);
CGContextRef gc = UIGraphicsGetCurrentContext();
CGContextTranslateCTM(gc, size.width / 2, size.height / 2);
# !/bin/bash
# Copyright (c) 2011 Float Mobile Learning
# http://www.floatlearning.com/
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
@robterrell
robterrell / HWUtils_getUsedMemory
Created April 29, 2014 22:10
HWUtils_getUsedMemory
const int HWUtils_getUsedMemory()
{
struct task_basic_info info;
mach_msg_type_number_t size = sizeof(task_basic_info);
kern_return_t kerr = task_info(mach_task_self(), TASK_BASIC_INFO, (task_info_t)&info, &size);
return (kerr == KERN_SUCCESS) ? (int)info.resident_size : 0; // size in bytes
}
using haxe.root;
#pragma warning disable 109, 114, 219, 429, 168, 162
namespace view{
public class PzBlur : Blur, haxe.lang.IHxObject {
public PzBlur(haxe.lang.EmptyObject empty) : base(){
unchecked {
}
}
Shader "Hidden/FastBlur" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_Bloom ("Bloom (RGB)", 2D) = "black" {}
}
CGINCLUDE
#include "UnityCG.cginc"
@robterrell
robterrell / estimate built IPA size
Created February 18, 2011 21:56
Run Script Build Phase to guesstimate the appstore size of your app
#!/usr/bin/perl
my $binfile = $ENV{'CODESIGNING_FOLDER_PATH'}.'/'.$ENV{'PRODUCT_NAME'};
my $binSize = -s $binfile;
my $kbsize = $binSize / 1024;
my $mbsize = $kbsize / 1024;
print "Binary Size = $mbsize MB ($kbsize KB)\n";
$zipResult = `zip -r /tmp/tempAppZip $ENV{'CODESIGNING_FOLDER_PATH'} -x $binfile`;

Game Engines

Name Latest Release Size (KB) License Type Unit Tests Docs Notes
The Render Engine 1.5.3 MIT Cross-browser; extensive API; open-source. 2
gameQuery 0.5.1 CC BY-SA 2.5 Designed to be used with jQuery
gTile 0.0.1 (2008-07-21) Tile based
Akihabara 1.3 GPL2/MIT Classic Repro Intended for making classic arcade-style games in JS+HTML5 3
The Javascript 2D Game Engine GPL Emphasis on gravity/physics/collision detection; uses HTML5 Canvas and ExplorerCanvas for IE support. Focus on limiting CPU usage. 4
The GMP Javascript Game Engine