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
const LinkedList = () => { | |
let _list = { | |
head: null, | |
tail: null, | |
length: 0 | |
} | |
// Node creator | |
let Node = (data) => { | |
let node = { |
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
const CronJob = require('cron').CronJob | |
const amqp = require('amqp-connection-manager') | |
const AMQP_URL = process.env.CLOUDAMQP_URL || 'amqp://localhost'; | |
if (!AMQP_URL) process.exit(1) | |
const WORKER_QUEUE = 'worker-queue' // To consume from worker process | |
const CLOCK_QUEUE = 'clock-queue' // To consume from clock process | |
const JOBS = [{ // You could store these jobs in a database | |
name: "Cron process 1", |
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
const amqp = require('amqp-connection-manager') | |
const AMQP_URL = process.env.CLOUDAMQP_URL || 'amqp://localhost'; | |
if (!AMQP_URL) process.exit(1) | |
const WORKER_QUEUE = 'worker-queue' | |
// Create a new connection manager from AMQP | |
var connection = amqp.connect([AMQP_URL]) |
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 { CustomPIXIComponent } from 'react-pixi-fiber' | |
import * as PIXI from 'pixi.js' | |
const TYPE = 'Background' | |
export const behavior = { | |
customDisplayObject: props => new PIXI.Graphics(), | |
customApplyProps: function(instance, oldProps, newProps) { | |
const { fill, x, y, width, height, onClick } = newProps | |
const onPointerDown = event => { | |
onClick(event.data.getLocalPosition(instance.parent)) |
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 React, { Component } from 'react' | |
import { Container } from 'react-pixi-fiber' | |
import Background from './Background' | |
import Button from './Button' | |
class Slider extends Component { | |
constructor(props) { | |
super(props) | |
this.state = { |
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 React, { Component } from 'react' | |
import { Container, Text } from 'react-pixi-fiber' | |
import Slider from 'components/Slider' | |
class MyComponent extends Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
text: '5.0' |
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
idle | |
FETCHING -> fetching | |
fetching | |
FETCH_SUCCESS -> resolve | |
FETCH_ERROR -> reject | |
FETCH_EMPTY -> empty | |
resolve | |
ready | |
OPEN_ZOOM_MODAL -> zoomModal | |
OPEN_OFFER_MODAL -> offerModal |
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
idle | |
FETCHING -> fetching | |
fetching | |
FETCH_SUCCESS -> resolve | |
FETCH_ERROR -> reject | |
FETCH_EMPTY -> empty | |
resolve | |
ready | |
OPEN_ZOOM_MODAL -> zoomModal | |
OPEN_OFFER_MODAL -> offerModal |
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
idle | |
FETCHING -> fetching | |
fetching | |
FETCH_SUCCESS -> resolve | |
FETCH_ERROR -> reject | |
FETCH_EMPTY -> empty | |
resolve | |
ready | |
OPEN_ZOOM_MODAL -> zoomModal | |
OPEN_OFFER_MODAL -> offerModal |
OlderNewer