This file contains hidden or 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
'use babel' | |
import { React } from 'inkdrop' | |
function createCodeBlockClass (OriginalCode) { | |
return class CodeBlock extends React.Component { | |
static propTypes = { | |
className: PropTypes.string, | |
lang: PropTypes.string, | |
children: PropTypes.any |
This file contains hidden or 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 Highlight (props) { | |
const { value, language } = props | |
const elements = [] | |
let index = 0 | |
const pushElement = (token, style) => { | |
elements.push(<span className={style || ''} key={++index}>{token}</span>) | |
} | |
const mode = CodeMirror.findModeByName(language) | |
CodeMirror.runMode(value, mode ? mode.mime : language, (token, style) => { | |
pushElement(token, style) |
This file contains hidden or 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
ReactDOM.render( | |
<Highlight | |
value='use strict;' | |
language='javascript' | |
/>, | |
document.getElementById('root') | |
) |
This file contains hidden or 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
// @flow | |
import { type HOC } from 'recompose' | |
import { connect } from 'react-redux' | |
import type { Dispatch } from '../types' | |
type CHOC<E: {}> = HOC<{ ...$Exact<E>, dispatch: Dispatch }, E> | |
export default function getDispatch<Enhanced: {}>(): CHOC<Enhanced> { | |
return (connect(): Function) | |
} |
This file contains hidden or 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
// @flow | |
import { type HOC } from 'recompose' | |
import { connect } from 'react-redux' | |
import type { Dispatch, State } from '../types' | |
type F<M> = (state: State) => M | |
type CHOC<E: {}, M> = HOC<{ ...$Exact<E>, dispatch: Dispatch, ...M }, E> | |
export default function connectStore<Enhanced: {}, M: *>( | |
mapper: F<M> |
This file contains hidden or 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
Desired=Unknown/Install/Remove/Purge/Hold | |
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend | |
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) | |
||/ Name Version Architecture Description | |
+++-==========================================-===================================-============-=============================================================================== | |
ii accountsservice 0.6.45-1ubuntu1 amd64 query and manipulate user account information | |
ii acl 2.2.52-3build1 amd64 Access control list utilities | |
ii acpi-support 0.142 amd64 scripts for handling many ACPI events | |
ii acpid 1:2.0.28-1ubuntu1 amd64 Advanced Configuration and Power Interface event daemon | |
ii ad |
This file contains hidden or 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
Desired=Unknown/Install/Remove/Purge/Hold | |
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend | |
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) | |
||/ Name Version Architecture Description | |
+++-===============================================-===========================================-============-=============================================================================== | |
ii accountsservice 0.6.45-1ubuntu1 amd64 query and manipulate user account information | |
ii accountwizard 4:17.12.3-0ubuntu1 amd64 wizard for KDE PIM applications account setup | |
ii acl 2.2.52-3build1 amd64 Access control list utilities | |
ii acpi-support 0.142 |
This file contains hidden or 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
package sensors | |
// Temperature and Pressure sensor | |
import ( | |
"log" | |
"os/exec" | |
"strings" | |
"strconv" | |
) |
This file contains hidden or 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
package main | |
import ( | |
"./sensors" | |
"log" | |
"time" | |
"context" | |
firebase "firebase.google.com/go" | |
"google.golang.org/api/option" | |
) |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> | |
<title>Craftzdog's Room Conditions</title> | |
<script src="lib/highcharts.js"></script> | |
<script src="lib/dark-unica.js"></script> | |
<script src="lib/moment.min.js"></script> |