Skip to content

Instantly share code, notes, and snippets.

View cjcliffe's full-sized avatar

Charles J. Cliffe cjcliffe

  • Cubic Productions
  • Lansdowne, Ontario, Canada
  • X @ccliffe
View GitHub Profile
@cjcliffe
cjcliffe / keyboard_code_enums.js
Created September 1, 2011 01:21
Javascript Keycode Enums
var enums = {};
enums.keyboard = {
BACKSPACE: 8,
TAB: 9,
ENTER: 13,
SHIFT: 16,
CTRL: 17,
ALT: 18,
PAUSE: 19,
CAPS_LOCK: 20,
@cjcliffe
cjcliffe / xml2json-badgerfish.js
Created March 27, 2011 19:44
XML Dom to Badgerfish JSON
function xml2badgerfish(xmlDoc) {
var jsonData = {};
var nodeStack = [];
var i, iMax, iMin;
var n = xmlDoc;
var j = jsonData;
var cn, tn;
var regEmpty = /^\s+|\s+$/g;
@cjcliffe
cjcliffe / com.cubicsdr.App.json
Last active July 11, 2016 23:05
CubicSDR Flatpak Instructions (work-in-progress)
{
"app-id": "com.cubicsdr.App",
"runtime": "org.gnome.Platform",
"runtime-version": "3.20",
"sdk": "org.gnome.Sdk",
"command": "CubicSDR",
"finish-args": [
"--socket=x11",
"--share=ipc",
"--share=network",
@cjcliffe
cjcliffe / SDRThreadBuffers_thresh.log
Created July 4, 2016 01:14
SDRThreadBuffers on exit
2016-07-03 21:12:29.539 CubicSDR[1760:36386] ApplePersistence=NO
Loading:: configuration file '/Users/ccliffe/Library/Application Support/CubicSDR/config.xml'
Loaded 206 rig models via hamlib.
Audio Device #0 Apple Inc.: Built-in Microphone
Default Output? No
Default Input? Yes
Input channels: 2
Output channels: 0
Duplex channels: 0
```
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0-libcxx/include/wx-3.0/wx/any.h:586:5: warning: expression
with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
wxDECLARE_ANY_TYPE(wxDateTime, WXDLLIMPEXP_BASE)
^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0-libcxx/include/wx-3.0/wx/any.h:560:5: note: expanded from
macro 'wxDECLARE_ANY_TYPE'
WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImpl<CLS>) \
^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0-libcxx/include/wx-3.0/wx/any.h:167:25: note: expanded from
@cjcliffe
cjcliffe / scramble.c
Created September 23, 2012 22:35
Dreamcast ISO prepartion tool
#include <stdio.h>
#include <stdlib.h>
#define MAXCHUNK (2048*1024)
static unsigned int seed;
void my_srand(unsigned int n)
{
seed = n & 0xffff;
```
Loading:: configuration file '/Users/Ton/Library/Application Support/CubicSDR/config.xml'
Loaded PPM for device 'Generic RTL2832U OEM :: 00000001' at 0ppm
Loaded I/Q Swap for device 'Generic RTL2832U OEM :: 00000001' as swapped
Loaded Direct Sampling Mode for device 'Generic RTL2832U OEM :: 00000001': off
Loaded offset for device 'Generic RTL2832U OEM :: 00000001' at 0Hz
Loaded PPM for device 'SDRPlay Device (experimental)' at 0ppm
Loaded I/Q Swap for device 'SDRPlay Device (experimental)' as swapped
Loaded Direct Sampling Mode for device 'SDRPlay Device (experimental)': off
Loaded offset for device 'SDRPlay Device (experimental)' at 0Hz
@cjcliffe
cjcliffe / cube_noscene_pointlight.html
Created May 18, 2012 23:51
Basic test with cube, light and no scene
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>
CubicVR.js: Basic Textured Cube
</title>
<script src="../../CubicVR.js" type="text/javascript">
</script>
<script type='text/javascript'>
```
Ton@TM-MBP:/Users/Ton/CubicSDR/build/x64>./CubicSDR
Loading:: configuration file '/Users/Ton/Library/Application Support/CubicSDR/config.xml'
Loaded PPM for device 'Generic RTL2832U OEM :: 00000001' at 0ppm
Loaded I/Q Swap for device 'Generic RTL2832U OEM :: 00000001' as not swapped
Loaded Direct Sampling Mode for device 'Generic RTL2832U OEM :: 00000001': off
Loaded offset for device 'Generic RTL2832U OEM :: 00000001' at 0Hz
Loaded PPM for device 'SDRPlay Device (experimental)' at 0ppm
Loaded I/Q Swap for device 'SDRPlay Device (experimental)' as swapped
@cjcliffe
cjcliffe / heightfield_test.html
Created March 10, 2012 22:44
Debugging ammo.js heightfield
<html>
<head>
<script src="ammo.js" type='text/javascript'></script>
<script type='text/javascript'>
var upIndex = 1;
var maxHeight = 100;
var flipQuadEdges=true;
var points = [0, 1, 2, 3,