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
| #!/usr/bin/env node | |
| const path = require('path'); | |
| const bin = path.basename(process.argv[1]); | |
| const chalk = require('chalk'); | |
| const debug = require('debug')(bin); | |
| const program = require('commander'); | |
| const httpProxy = require('http-proxy'); |
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
| // | |
| // https://stackoverflow.com/questions/12539574/whats-the-best-way-most-efficient-to-turn-all-the-keys-of-an-object-to-lower/12540603#12540603 | |
| // | |
| /** @summary objectKeysToLowerCase( input, deep, filter ) | |
| * returns a new object with all own keys converted to lower case. | |
| * The copy can be shallow (default) or deep. | |
| * | |
| * Circular references is supported during deep copy and the output will have | |
| * the same structure. | |
| * |
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
| // Cap Generator | |
| // https://www.thingiverse.com/thing:1943463/#files | |
| /*----------------------------------------------------------------------------*/ | |
| /* Cap Generator | |
| /* by Ziv Botzer | |
| /*----------------------------------------------------------------------------*/ | |
| // Turn on for validation during preview, TURN OFF FOR PRODUCTION | |
| show_slice = "On"; // [On, Off] |
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
| const units = [ | |
| 'B', | |
| 'KB', | |
| 'MB', | |
| 'GB', | |
| 'TB', | |
| 'PB', | |
| 'EB', | |
| 'ZB', | |
| 'YB', |
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
| sudo nmap -sP 192.168.0.0/24 | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}' |
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
| // | |
| // http://aqicn.org/air/view/sensor/spec/pms7003.pdf | |
| // | |
| const SerialPort = require('serialport'); | |
| const port = new SerialPort('/dev/ttyUSB0', { | |
| baudRate: 9600 | |
| }); |
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
| # GRBL Source (The standard GRBL firmware is identaical to the Inventables GRBL, just some minor config changes.) | |
| https://github.com/gnea/grbl | |
| Compiled with settings: | |
| [Changes to (config.h)] | |
| #define DEFAULTS_X_CARVE_1000MM | |
| #define HOMING_FORCE_SET_ORIGIN // Enabled | |
| #define ENABLE_M7 // Enabled | |
| #define ENABLE_SAFETY_DOOR_INPUT_PIN // Enabled |
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
| require('babel-core/register'); | |
| require('babel-polyfill'); | |
| const timeout = (ms) => new Promise((resolve, reject) => { | |
| setTimeout(() => reject(new Error(`Timeout exceeded: ${ms}ms`)), ms); | |
| }); | |
| class Player {} | |
| class AsyncAction { |
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
| import React from 'react'; | |
| import styled, { css } from 'styled-components'; | |
| const Component = styled.div`${({ | |
| width, | |
| height, | |
| before, | |
| beforeBorderMask, | |
| beforeBorderColor, | |
| beforeBackgroundColor, |
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
| import PropTypes from 'prop-types'; | |
| import React from 'react'; | |
| class Carousel extends React.Component { | |
| static propTypes = { | |
| limit: PropTypes.number, | |
| total: PropTypes.number, | |
| data: PropTypes.oneOfType([ | |
| PropTypes.object, | |
| PropTypes.array |