sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
# Set the maximum number of open file descriptors
ulimit -n 20000000
# Set the memory size for TCP with minimum, default and maximum thresholds
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'| import { EJSON } from 'meteor/ejson'; | |
| function getOptions(self) { | |
| const opts = []; | |
| if (self.global) opts.push('g'); | |
| if (self.ignoreCase) opts.push('i'); | |
| if (self.multiline) opts.push('m'); | |
| return opts.join(''); | |
| } |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Responsive Plotly Charts</title> | |
| <!-- Bootstrap --> | |
| <link href="/static/css/bootstrap.min.css" rel="stylesheet"> |
We're big fans of open source software at Legal Robot. We also know that getting security right is a tough job, so we want to share some of the useful tools we use to build and run Legal Robot and keep it secure.
We are also proud to run Legal Robot on the Meteor framework for Node.js. With this recent change, Helmet.js becomes the official recommendation for security headers in Meteor, replacing the previous Meteor browser-policy package.
One of the most helpful tools in our Meteor security toolbox at Legal Robot is Content Security Policy (CSP) — basically, our server tells the browser what code it is allowed to run and how to handle something like code injection from a malicious browser extension.
CSP can be quite tricky, but there are some excellent tools out there to help, like [Google'
| // http://blog.vjeux.com/2011/javascript/cyclic-object-detection.html. | |
| function isCyclic (obj) { | |
| var seenObjects = []; | |
| function detect (obj) { | |
| if (obj && typeof obj === 'object') { | |
| if (seenObjects.indexOf(obj) !== -1) { | |
| return true; | |
| } | |
| seenObjects.push(obj); |
| name: Deploy | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| test: | |
| name: Tests | |
| runs-on: ubuntu-latest |
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'instead ofconst foo = require('foo')to import the package. You also need to put"type": "module"in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)from CommonJS instead ofrequire(…). - Stay on the existing version of the package until you can move to ESM.