This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Listener<T extends Array<any>> = (...args: T) => undefined | |
type EventMap = { | |
[index: string]: any[] | |
} | |
class TypedEvents<Events extends EventMap> { | |
private events: { | |
[K in keyof Events]?: Listener<Events[K]>[] | |
} = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Gpio } from 'pigpio'; | |
import NanoTimer from 'nanotimer'; | |
function sleep(ms: number) { | |
return new Promise((resolve) => { | |
new NanoTimer().setTimeout(resolve, '', `${ms * 1000}u`); | |
}); | |
} | |
const stepperConfigs = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
* { | |
transition-duration: 0 !important; | |
animation-duration: 0 !important; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
Smudge=$(git config --global filter.tabspace.smudge) | |
echo $Smudge; | |
if [ "$Smudge" == '' ]; then | |
git config --global filter.tabspace.smudge 'unexpand -t 4' | |
git config --global filter.tabspace.clean 'expand -t 4' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in place array unique | |
function unique (arr) { | |
var i = 0; | |
var end = arr.length - 1; | |
while (i < end) { | |
var item = arr[i]; | |
var index = arr.lastIndexOf(item, end); | |
if (index > i) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ItemView = require('marionette').ItemView; | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { Provider } from 'react-redux'; | |
import store from 'app/store'; | |
class MarionetteContainer extends React.Component { | |
render () { |
NewerOlder