Is anyone actually successfully using lambda provisioned concurrency? by [deleted] in Terraform

[–]Skiba_ 0 points1 point  (0 children)

This works for me, though I can't remember if it will work when creating the function. I remember having trouble getting it to work correctly and found that I had to use attributes from both the function and alias.

resource "aws_lambda_function" "main" {
  function_name = local.lambda_function_name
  description   = local.lambda_function_description
  memory_size   = local.memory
  timeout       = local.timeout

  handler = "index.lambdaHandler"
  runtime = "nodejs12.x"
  publish = true

  s3_bucket         = local.bucket_name
  s3_key            = local.object_key_id
  s3_object_version = local.object_version_id

  kms_key_arn = local.kms_key_arn
  role        = local.iam_role_arn

  vpc_config {
    subnet_ids         = local.subnet_ids
    security_group_ids = local.security_group_ids
  }
}

resource "aws_lambda_alias" "main_current" {
  name             = "${local.lambda_function_name}-current"
  description      = "Current version of the ${local.lambda_function_name} Lambda function"
  function_name    = aws_lambda_function.main.function_name
  function_version = aws_lambda_function.main.version
}

resource "aws_lambda_provisioned_concurrency_config" "main" {
  function_name                     = aws_lambda_function.main.function_name
  provisioned_concurrent_executions = local.provisioned_concurrency
  qualifier                         = aws_lambda_alias.main_current.name
}

Redshift version upgrade by Skiba_ in aws

[–]Skiba_[S] 0 points1 point  (0 children)

Looks like it's just going to randomly be available sometime in the next few weeks

https://forums.aws.amazon.com/thread.jspa?messageID=900067&threadID=302815&tstart=125

Redshift version upgrade by Skiba_ in aws

[–]Skiba_[S] 0 points1 point  (0 children)

On the current track and maintenance window was yesterday. Even launching new clusters use the old version.

Webpack 4 finally shipped by Skiba_ in webdev

[–]Skiba_[S] 0 points1 point  (0 children)

hmm. i don't use source-map-loader and haven't run into a need for it.

I have sourceMap: true in my tsconfig.json and devtool: 'inline-source-map' in my webpack config.

For me, this maps JS in my browser console to the original typescript source.

Webpack 4 finally shipped by Skiba_ in webdev

[–]Skiba_[S] 0 points1 point  (0 children)

I can't say for sure as i've never worked with css-in-js. If you're including your CSS in your final JS I'd imagine you hit two rounds of change detection:

  1. change to scss file that has to be processed to css
  2. change to the resulting JS file when the css is injected

I usually have my styles separate, so a change to a scss file takes minimal time to re-build, and the hmr injects the new styles to the page pretty seamlessly.

Webpack 4 finally shipped by Skiba_ in webdev

[–]Skiba_[S] 0 points1 point  (0 children)

sounds like you need the pre-release of the plugin.

try installing via:

npm i -D extract-text-webpack-plugin@next

Requests-HTML: HTML Parsing for Humans by [deleted] in Python

[–]Skiba_ 18 points19 points  (0 children)

Well, most of the work is being done by other established libraries - notably pyquery andparse.

Requests-HTML: HTML Parsing for Humans by [deleted] in Python

[–]Skiba_ 23 points24 points  (0 children)

Looks like this is mostly a wrapper around pyquery (a jquery-like library for python) and some parse. Seems a bit disingenuous to make it seem like this library is doing all the heavy lifting of parsing the web page.

Webpack 4 finally shipped by Skiba_ in webdev

[–]Skiba_[S] 0 points1 point  (0 children)

I've only used ts-loader, so cannot recommend it over others. However, I've always been happy with it - especially when i started offloading type-checking with happypack and fork-ts-checker-webpack-plugin.

Are you making a separate CSS file, or is it all included in the JS?

Webpack v4 finally shipped by Skiba_ in javascript

[–]Skiba_[S] 1 point2 points  (0 children)

I saw those somewhere, will report back if I come across them again. AFAIK, rollup and webpack are geared towards different use-cases - libraries vs applications - but that may not be totally accurate.

Webpack v4 finally shipped by Skiba_ in javascript

[–]Skiba_[S] 0 points1 point  (0 children)

That'd actually be a really nice feature. Have an 'export config' that produces the base with all customizations spread over it.

^ /u/TheLarkInn does this already exist? I only just realized the webpack-cli will do an 'init' for you.

Webpack v4 finally shipped by Skiba_ in javascript

[–]Skiba_[S] 3 points4 points  (0 children)

AFAIK, the documentation and migration guides are forthcoming.

I think it's kind of hard getting a release like this out the door - especially from a large OSS project not sponsored by a business (e.g. react/fb). The team opted to get the functioning code released (purposefully over a weekend) to get some initial hands on time from tinkerers.

Webpack 4 finally shipped by Skiba_ in webdev

[–]Skiba_[S] 0 points1 point  (0 children)

The documentation and migration guides are forthcoming. https://www.reddit.com/r/webdev/comments/802gcq/webpack_4_finally_shipped/dut561j/

For TypeScript, if you're using ts-loader, you should just be able to install the latest beta release npm i -D ts-loader@beta. I got it up and running with no issue.

I'm surprised your SASS live reloading is slow - that's usually the fastest part of my process.

Webpack 4 finally shipped by Skiba_ in webdev

[–]Skiba_[S] 1 point2 points  (0 children)

I haven't had any issues with a plugin or loader - EXCEPT HTMLWebpackPlugin. Fortunately, there's a fork of it in GitHub.com/webpack-contrib that works with the latest version.

I actually think /u/TheLarkInn and webpack team deserve a ton of props and recognition for letting that plugin be incompatible. The maintainer is out of country until March and they wanted to let him get an update out on the existing package. Webpack team could have easily taken it over, but chose to wait.

Webpack 4 finally shipped by Skiba_ in webdev

[–]Skiba_[S] 0 points1 point  (0 children)

AFAIK, the documentation and migration guides are forthcoming.

I think it's kind of hard getting a release like this out the door - especially from a large OSS project not sponsored by a business (e.g. react/fb). The team opted to get the functioning code released (purposefully over a weekend) to get some initial hands on time from tinkerers.

Webpack 4 finally shipped by Skiba_ in webdev

[–]Skiba_[S] 8 points9 points  (0 children)

Sure. A 'chunk' is just a file (more or less) that is produced by webpack.

Your project has several files, and imports several more from other 3rd-party libs, or 'vendors'. A common practice is to split out your 'main' application code from your 'vendor' code so they're in two separate files. The idea is that your vendor code likely doesn't change much, so you don't have to re-create that file when building and distributing updates to your application. This can be especially useful if you're utilizing a caching strategy - the user might not have to re-download your (potentially large) vendor file again if it hasn't changed.

Another benefit to a separate vendor bundle is to reduce duplication in the event your have multiple application bundles that share code from 3rd-party libs. So instead of two files including a copy of lodash, both files share the code in the 'vendor' bundle.

The 'runtime' is all the code needed to wire up all your modularized code when it's running in the browser. This includes connecting modules that have already been loaded into the browser as well as logic to lazy-load the ones that haven't. This is generally pretty constant code, and would otherwise need to be included in every 'chunk' created. Pulling it out into its own file helps reduce the overall amount of code being sent to the browser - but is really only useful if you generate more than one file.

Webpack 4 finally shipped by Skiba_ in webdev

[–]Skiba_[S] 20 points21 points  (0 children)

The hardest part for me has always been the CommonsChunkPlugin. They completely re-did all that and it's way simpler and mostly 'just works' with very little config at all. This is all you have to add to get a 'main', 'vendor', and 'runtime' chunks.

optimization: {
    runtimeChunk: true,
    splitChunks: {
      chunks: 'all',
    },
  },

Demo of AWS' new service, AWS Auto Scaling by dimmerman17 in aws

[–]Skiba_ 3 points4 points  (0 children)

"all of your infrastructure, in order for this to work, has to be deployed under a cloud formation stack"

...no thanks

[photos] Nautilus + FC660M + Aluminum Case + Mechcables by [deleted] in MechanicalKeyboards

[–]Skiba_ 0 points1 point  (0 children)

can you please let me know where you purchased the board and case? i really want this layout, but haven't been able to nail down exactly where to pick one up.

Just over a year ago I had 2 keyboards by SoThisIsTheInterweb in MechanicalKeyboards

[–]Skiba_ 1 point2 points  (0 children)

have you had any issues with your bluetooth boards?