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
const units = [ | |
'B', | |
'KB', | |
'MB', | |
'GB', | |
'TB', | |
'PB', | |
'EB', | |
'ZB', | |
'YB', |
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
// 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 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 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 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 'trendmicro-ui/dist/css/trendmicro-ui.css'; | |
import '@trendmicro/react-buttons/dist/react-buttons.css'; | |
import { Button } from '@trendmicro/react-buttons'; | |
import React, { PureComponent } from 'react'; | |
import ReactDOM from 'react-dom'; | |
import styled from 'styled-components'; | |
import Navbar from './Navbar'; | |
import Portal from '../src'; | |
const StyledPortal = styled(Portal)` |
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
<Widget widgetId="threats" /> | |
// ES7 class properties | |
class Widget extends React.Component { | |
state = this.getInitialState(); // ? | |
getInitialState() { | |
return { | |
widgetId: this.props.widgetId | |
}; |
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
## Application Blocking | |
### ApplicationControl.jsx | |
```js | |
import PropTypes from 'prop-types'; | |
import React, { PureComponent } from 'react'; | |
import BlockedAppsModal from './BlockedAppsModal'; | |
import { | |
MODAL_BLOCKED_APPS | |
} from './constants'; |
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
.custom-scroll::-webkit-scrollbar { | |
-webkit-overflow-scrolling: touch; | |
height: 10px; | |
width: 10px | |
} | |
.custom-scroll::-webkit-scrollbar:hover { | |
background-color: #E9E9E9; | |
border: 1px solid #dbdbdb | |
} |
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 omit from 'lodash/omit'; | |
import React, { Component, PropTypes } from 'react'; | |
const REGEXP = /{{(.+?)}}/; | |
class Interpolate extends Component { | |
static defaultProps = { | |
parent: 'span' | |
}; |