Skip to content

Instantly share code, notes, and snippets.

View amclain's full-sized avatar

Alex McLain amclain

View GitHub Profile
gem update --system
gem update
gem install \
0mq \
bundler \
compound \
fivemat \
ionian \
pry \
pry-rescue \
structure _Queue // generic queue structure - must init in define_start
{
char sCommand[200][100]
integer nHead
integer nTail
integer nBusy
integer nBusyTime // how long queue locks out before next command
integer nHeadMax // maximum size of queue (can't be more than first index of .sCommand)
integer nQueReady // true if response from device is an ack otherwise timeout the Que
integer nDebug // you KNOW what this does...
<!-- Custom Thrustmaster Warthog HOTAS mapping for Star Citizen -->
<!-- Binding Names: http://www.starcitizen-sgc.com/scdefaultprofile -->
<ActionMaps version="0" >
<actionmap name="spaceship_general">
<action name="v_eject">
<rebind device="joystick" input="js2_button21" /><!-- L/G Warning Silence -->
</action>
<action name="v_use_docking">
<rebind device="joystick" input="js2_button26" /><!-- Autopilot Engage (Black) -->
</action>
// USB key definitions for Thrustmaster TARGET Script
// -----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2014 Alex McLain
//
// 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
<!-- Custom Thrustmaster Warthog HOTAS mapping for Star Citizen -->
<!-- Binding Names: http://www.starcitizen-sgc.com/scdefaultprofile -->
<ActionMaps version="0" >
<CustomisationUIHeader device="joystick" label="JoystickTMWarthog" description="@ui_JoystickTMWarthogDesc" image="JoystickTMWarthog" />
<deviceoptions name="Joystick - HOTAS Warthog">
<!-- Reduce the deadzone -->
<option input="x" deadzone="0.015" />
<option input="y" deadzone="0.015" />
</deviceoptions>
{
// "color_scheme": "Packages/MarkdownEditing/MarkdownEditor.tmTheme",
"color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Dark.tmTheme",
// "color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Yellow.tmTheme",
// Layout
"draw_centered": false,
"word_wrap": true,
"wrap_width": 80,
"rulers": [80],
@amclain
amclain / dgx32 v1.2.312 firmware hotfix duet exceptions.txt
Created November 13, 2014 23:29
AMX DGX32 v1.2.312 firmware update fails to start AutoPatch Java servlet.
Line 1 (14:57:43):: Memory Available = 991723520 <204800>
Line 2 (14:57:43):: Memory Available = 991596544 <126976>
Line 3 (14:57:43):: Accepted connection:socket=120 addr=::ffff:10.30.50.62 port=33555
Line 4 (14:57:43):: Memory Available = 991567872 <28672>
Line 5 (14:57:43):: /opt/amx/javalib/jars/IntegratedApp/IntegratedApp.jar bundle matches flash file manifest
Line 6 (14:57:43):: starting /opt/amx/javalib/jars/IntegratedApp/IntegratedApp.jar bundle
Line 7 (14:57:43):: Service: Enova DGX iApp PHAL v1.2.1.15
Line 8 (14:57:43):: Memory Available = 991449088 <118784>
Line 9 (14:57:43):: TwinRivers:: Enova DGX Integrated Device Application v1.2.1.15
Line 10 (14:57:43):: Memory Available = 991342592 <106496>
require 'ionian'
t1 = Time.now
puts t1
begin
s = Ionian::Socket.new host: '192.168.253.253:5000'
ensure
t2 = Time.now
puts t2
(***********************************************************
Binary OR Bug
************************************************************)
PROGRAM_NAME = 'bor bug'
(***********************************************************)
(* System Type : NetLinx *)
(***********************************************************)
(* DEVICE NUMBER DEFINITIONS GO BELOW *)
(***********************************************************)
@amclain
amclain / console_output.txt
Created February 17, 2015 23:22
REXML Line Feed Bug
Write Text: "bar"
Read Text: "\n bar\n "
XML String:
<root>
<foo>
bar
</foo>
</root>