Skip to content

Instantly share code, notes, and snippets.

View chrishyle's full-sized avatar

Chris Hyle chrishyle

View GitHub Profile
@chrishyle
chrishyle / machine.js
Created March 20, 2020 10:21
Generated by XState Viz: https://xstate.js.org/viz
const gameMachine = Machine(
{
id: "game",
initial: "nogame",
context: {
players: [],
roles: [
{
name: "1",
isActive: true
@chrishyle
chrishyle / machine.js
Last active March 20, 2020 07:51
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 chrishyle on github.
  • I am chx21 (https://keybase.io/chx21) on keybase.
  • I have a public key ASAbmnAN4aG4b64kqH3Ye81U5D8VYJfrz_vAbbDXR7z8qAo

To claim this, I am signing this object:

buffer:46
return this.utf8Write(string, offset);
^
TypeError: Offset is out of bounds
at Buffer.write (buffer:46:19)
at Object.write (fs:162:14)
at writeAll (fs:312:6)
at fs:321:27
at node.js:204:9
#!/bin/bash
#set the bash environment to allow 2048 simultaneous files to be open (instead of 256)
ulimit -n 2048
#move up to the root level
#(allows this script to be triggered from any directory and still be self contained to the project)
cd `dirname $0`/..
#launch the build.js runner, passing through all command-line arguments
#!/usr/local/bin/node
/**
Usage:
Launch a dev server: build.js --server --debug
Save to disk: build.js --save --debug (currently broken)
(debug turns on verbose output)
//main.js
App.main = function(){
App.getPath('mainPage.mainPane').append();
};
//main_page.js
App.mainPage = SC.Page.design({
mainPane: SC.MainPane.design({
childViews: ....
});
Shared.store.findAll(SC.Query.create({recordType: Shared.UserGroup})).length()
0
Shared.store.findAll(Shared.UserGroup).length()
38
Shared.store.findAll(SC.Query.create({recordType: Shared.User})).length()
151
Shared.store.findAll(Shared.User).length()
151
MyApp.RowView = SC.ListItemView.extend({
classNames: ['sc-theme myApp-list-item'],
hasStatusIcon: YES,
hasMyField: YES,
statusIconKey: null,
myFieldKey: null,
mySecondFieldKey: null,
myThirdFieldKey: null,
// SC.DateTime additions:
// added to parse method --
case 'Z':
var modifier = scanner.scan(1);
if(modifier == 'Z'){
opts.timeZoneOffset = 0;
} else {
var timeZoneHours = scanner.scanInt(2);