This is a test.
- Foo
- Bar
- Baz
Hello
| const path = require('path') | |
| const NODE_ENV = process.env.NODE_ENV || 'development' | |
| const outputFile = 'pdfmake.js' | |
| const libraryName = 'pdfmake' | |
| const config = { | |
| entry: './src/browser-extensions/pdfMake.js', | |
| output: { | |
| path: path.join(__dirname, './build'), |
| import MyStuff from 'frontend/components/my-stuff' | |
| module.exports = { | |
| renderStuff(node, props) { | |
| // Wrap in <Provider/> here too if using Redux | |
| ReactDOM.render(<MyStuff {...props} />, node) | |
| } | |
| } |
| import React, { Component } from "react"; | |
| function ProductItem({ product }) { | |
| return ( | |
| <li> | |
| {product.name} {product.price} | |
| </li> | |
| ); | |
| } |
| alias -='cd -' | |
| alias ..='cd ..' | |
| alias ..-='cd .. && cd -' | |
| alias ...='cd ../..' | |
| alias ....='cd ../../..' | |
| alias .....='cd ../../../..' | |
| alias be='bundle exec' | |
| alias cl='clear' | |
| alias cleanup='find . -name '\''*.DS_Store'\'' -type f -ls -delete' | |
| alias d='docker' |
| import React, { Component } from "react"; | |
| import logo from "./logo.svg"; | |
| import "./App.css"; | |
| import { BrowserRouter as Router, Route, Link } from "react-router-dom"; | |
| const COMPANIES = [ | |
| { | |
| id: 1, | |
| name: "Foo", | |
| accounts: [{ id: 4, name: "SubAccount", accounts: [] }] |
| /** | |
| * Control a USB relay board using USB. | |
| * | |
| * This code helped a lot in the understanding of what they boards | |
| * expect for hex inputs: | |
| * https://github.com/jaketeater/Very-Simple-USB-Relay/blob/master/relay.py | |
| */ | |
| const HID = require('node-hid') | |
| const ON = 0xfe |
| /** | |
| * Control a USB relay board using USB. | |
| * | |
| * This code helped a lot in the understanding of what they boards | |
| * expect for hex inputs: | |
| * https://github.com/jaketeater/Very-Simple-USB-Relay/blob/master/relay.py | |
| */ | |
| const HID = require('node-hid') | |
| const ALL_ON = 0xfe |
| SUBSYSTEM=="input", GROUP="input", MODE="0666" | |
| SUBSYSTEM=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", MODE:="666", GROUP="plugdev" | |
| KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", MODE="0666", GROUP="plugdev" |
| // Lots of examples here: | |
| // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array | |
| const arr = [ 1, 2, 3 ] | |
| // first item in array: | |
| arr[0] | |
| // last item: | |
| arr[2] |