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
#include <Arduino.h> | |
#define R 11 | |
#define G 10 | |
#define B 9 | |
String read; | |
String getMessage() { | |
return Serial.readStringUntil('|'); |
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
#include <Arduino.h> | |
#include <TimerOne.h> | |
#include <util/atomic.h> | |
#define LED1 10 // RED | |
#define LED2 11 // BLUE | |
#define LED3 12 // GREEN | |
#define SWITCH_1 2 | |
#define SWITCH_2 3 | |
#define SWITCH_3 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
import React from 'react'; | |
export default class Wrapper extends React.Component { | |
shouldComponentUpdate() { | |
// very important. You never rerender, instead use component did receive props and update your jquery plugin | |
return false; | |
} | |
safeRender() { | |
return <div className="some-class-that-matters" ref={element => this.wrapper = element}></div>; | |
componentDidMount() { |
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
{ | |
Query: { | |
file({id}) { | |
// connector is a dataload aware connector which has been instantiated | |
// with information about this domain specifically | |
return connector.get(id, context); | |
} | |
}, | |
File: { | |
// definite candidate for memoization |
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 File { | |
id: Int! | |
name: String! | |
size: Int | |
type: String! | |
md5: String! | |
uploadedBy: String! | |
uploaded: Date! | |
filePath: String! | |
dpi: Int! |
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
function get(url) { | |
return new Promise((resolve, reject) => { | |
$.get(url, {success: resolve, error: reject}) | |
}); | |
} |
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
Show hidden characters
{ | |
"presets": [ | |
"latest" | |
], | |
"plugins": [ | |
"transform-decorators-legacy", | |
"transform-class-properties" | |
] | |
} |