sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
| import React, { Component } from 'react' | |
| import CloudWatchLogs from 'aws-sdk/clients/cloudwatchlogs' | |
| import Fingerprint2 from 'fingerprintjs2' | |
| import StackTrace from 'stacktrace-js' | |
| import { promisify } from 'es6-promisify' | |
| export default class Logger { | |
| events = [] | |
| originalConsole = null |
| # Get root: | |
| sudo su | |
| # Install prerequisites: | |
| apt-get install build-essential pkg-config checkinstall git avahi-daemon libavahi-client-dev libcrack2-dev libwrap0-dev autotools-dev automake libtool libdb-dev libacl1-dev libdb5.1-dev db-util db5.1-util libgcrypt11 libgcrypt11-dev | |
| # Build libevent from source: | |
| cd /usr/local/src |
| find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \; |
| Secure sessions are easy, but not very well documented. | |
| Here's a recipe for secure sessions in Node.js when NginX is used as an SSL proxy: | |
| The desired configuration for using NginX as an SSL proxy is to offload SSL processing | |
| and to put a hardened web server in front of your Node.js application, like: | |
| [NODE.JS APP] <- HTTP -> [NginX] <- HTTPS -> [PUBLIC INTERNET] <-> [CLIENT] | |
| Edit for express 4.X and >: Express no longer uses Connect as its middleware framework, it implements its own now. |
| packages: | |
| yum: | |
| git: [] | |
| files: | |
| /opt/elasticbeanstalk/hooks/appdeploy/pre/51install_meteor.sh: | |
| mode: "000755" | |
| user: root | |
| group: root | |
| encoding: plain |
| /** | |
| * Author: @joostkiens | |
| * Licensed under the MIT license | |
| */ | |
| body { | |
| background: | |
| linear-gradient(-90deg, rgba(0,0,0,.05) 1px, transparent 1px), | |
| linear-gradient(rgba(0,0,0,.05) 1px, transparent 1px), | |
| linear-gradient(-90deg, rgba(0, 0, 0, .04) 1px, transparent 1px), | |
| linear-gradient(rgba(0,0,0,.04) 1px, transparent 1px), |
Only files under 25 MB can be previewed with the Google Drive viewer.
Google Drive viewer helps you preview over 16 different file types, listed below:
| <script src="THING_TO_TEST.js"></script> | |
| <script src="tinytest.js"></script> | |
| <script> | |
| TinyTest.run('THING_TO_TEST.js', { | |
| 'some test name': function() { | |
| this.assertEquals(1, 2); | |
| }, |