- 1 core / 2 GB RAM / 20 GB SSD
- 1 core / 1 GB RAM / 8 GB
- 1 core / 512 MB RAM / 20 GB SSD
// Simplest Lambda URL test | |
package main | |
import ( | |
"context" | |
"fmt" | |
"github.com/aws/aws-lambda-go/events" | |
"github.com/aws/aws-lambda-go/lambda" |
IGNORE_FILE=$([ -f .eslintignore ] && echo ".eslintignore" || echo ".gitignore") | |
ESLINT_REPORT=$(echo "npx eslint . --cache=true --ignore-path=$IGNORE_FILE -f json || true") | |
echo $ESLINT_REPORT |
# Filename-based cache busting | |
# taken from https://github.com/h5bp/html5-boilerplate/ | |
# This rewrites file names of the form `name.123456.js` to `name.js` | |
# so that the browser doesn't use the cached version when you have | |
# updated (but not manually renamed) the file. | |
<IfModule mod_rewrite.c> | |
Options +FollowSymlinks | |
RewriteEngine On |
server { | |
listen 80; | |
server_name mysite.com; | |
root /var/www/mysite.com/; | |
location / { | |
if (-f $document_root/maintenance.html) { | |
return 503; | |
} | |
... # the rest of your config goes here |
const npmCheck = require('npm-check') | |
const chalk = require('chalk') | |
const stripAnsi = require('strip-ansi') | |
const _flatten = require('lodash.flatten') | |
const _compact = require('lodash.compact') | |
const table = require('text-table') | |
const emoji = require('node-emoji') | |
function uppercaseFirstLetter(str) { | |
return str[0].toUpperCase() + str.substr(1) |
The goal of this is to have an easily-scannable reference for the most common syntax idioms in JavaScript and Rust so that programmers most comfortable with JavaScript can quickly get through the syntax differences and feel like they could read and write basic Rust programs.
What do you think? Does this meet its goal? If not, why not?
JavaScript:
'use strict' | |
const crypto = require('crypto') | |
/** | |
* Do a constant time string comparison. Always compare the complete strings | |
* against each other to get a constant time. This method does not short-cut | |
* if the two string's length differs. | |
* | |
* @param {string} a |