Skip to content

Instantly share code, notes, and snippets.

View developit's full-sized avatar
🦊
write, the codes

Jason Miller developit

🦊
write, the codes
View GitHub Profile
@developit
developit / material-ui-jsdelivr-cdn.htm
Created January 22, 2020 17:16 — forked from tomByrer/material-ui-jsdelivr-cdn.htm
React-MUI using jsDelivr CDN for in-browser hydration.
<!DOCTYPE html>
<html lang="en">
<head>
<title>My page</title>
<meta charset="utf-8" />
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width" />
<script src="https://cdn.jsdelivr.net/combine/npm/react@16.12/umd/react.development.js,npm/react-dom@16.12/umd/react-dom.development.js,npm/@material-ui/core@4.8/umd/material-ui.development.js,npm/@babel/standalone@7.8/babel.min.js" crossorigin="anonymous"></script>
<!-- Seperate Links
src: https://github.com/mui-org/material-ui/blob/master/examples/cdn/index.html -->
@developit
developit / index.tsx
Created January 17, 2017 20:21 — forked from seveves/index.tsx
List and ListItem Preact
import { Component, h } from 'preact';
import ListItem from '../list-item';
export default class List extends Component<{}, { indices: number[] }> {
state = { indices: [0, 1, 2, 3] };
public render() {
return (
@developit
developit / deferred.js
Last active July 9, 2016 18:19 — forked from tec27/deferred.js
An extension of ES6 Promises that allows for easier deferred resolution/rejection
export class Deferred extends Promise {
constructor(executor) {
super( (resolve, reject) => {
this.resolve = resolve;
this.reject = reject;
if (executor) executor(resolve, reject);
});
}
}
@developit
developit / autocomplete.js
Last active August 29, 2015 14:23 — forked from pk11/reactjs.js
/**
* Our component structure will look like the following:
* - WikiBox
* -- AutoCompleteBox
* --- AutoComplete
*/
/** Renders a single entity coming from wikipedia */
class AutoComplete extends React.Component {
render() {
@developit
developit / warsting.ino
Last active August 29, 2015 14:17 — forked from zsup/warsting.ino
/** Slay and pillage an unprotected network! ...oh, we can't do that?
* Ok, let's publish an event instead, to a backdrop of flashing lights
* and clashing of metal on metal.
*/
void vanquishOpenNetwork() {
if (!openNetworkCount || !strongest.rssi) {
return;
}
// allow the system to control the LED so we can see cloud connection progress
// Node style module writ in ES6 syntax:
export default foo = () => console.log(‘hi’)
// Unfortunately “literally” transpiles to this:
exports.default = function foo() {
return console.log(‘hi’)
}
// Which means this will fail:
var foo = require(‘./foo’)