Skip to content

Instantly share code, notes, and snippets.

@chadrickm
chadrickm / machine.js
Last active August 28, 2023 18:34
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions

Keybase proof

I hereby claim:

  • I am chadrickm on github.
  • I am chadrickm (https://keybase.io/chadrickm) on keybase.
  • I have a public key whose fingerprint is 7F2D FB26 0545 859F B713 BE81 B2A0 CB52 960E E4DF

To claim this, I am signing this object:

@chadrickm
chadrickm / gist:6792431
Last active December 24, 2015 11:39
ko new form workflow
MIS.General.ToolRequestCreateScreen.ViewModel = function (jsonModel) {
var self = this;
self.ToolRequest = new MIS.General.ToolRequestViewModel(jsonModel.ToolRequest);
self.Inserts = ko.observableArray([]);
self.InsertName = ko.observable('');
self.InsertDescription = ko.observable('');
self.AddInsert = function () {
@chadrickm
chadrickm / robot.js
Created December 12, 2012 21:01
DeathAng3l2
// Conventions:
// We use angles in degrees in clock-wise fashion
RobotHelpers = {};
MathHelpers = {};
RobotHelpers.cannon_rotation_direction = {};
RobotHelpers.shoot = {};
RobotHelpers.target = {};
RobotHelpers.moving_direction = {};
@chadrickm
chadrickm / robot.js
Created December 9, 2012 15:38
Billy
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);