| Runner | OS | Processor (CPU) | Memory (RAM) |
|---|---|---|---|
| ubuntu-latest | Ubuntu - 22.04 | - Model: Intel Xeon E5-2673 v4 @ 2.30GHz - # of cores: 2 |
7 GB |
| windows-latest | Windows - 2022 | - Model: Xeon® Platinum 8272CL - # of cores: 2 |
7 GB |
| macos-latest | MacOS - 12 | - Model: Intel Xeon E5-1650 v2 @ 3.50GHz - # of cores: 3 |
14 GB |
This file contains hidden or 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
| Runner | OS | Processor (CPU) | Memory (RAM) | |
|---|---|---|---|---|
| ubuntu-latest | Ubuntu - 22.04 | Model: Intel Xeon E5-2673 v4 @ 2.30GHz # of cores: 2 | 7 GB | |
| windows-latest | Windows - 2022 | Model: Xeon® Platinum 8272CL # of cores: 2 | 7 GB | |
| macos-latest | MacOS - 12 | Model: Intel Xeon E5-1650 v2 @ 3.50GHz # of cores: 3 | 14 GB |
This file contains hidden or 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 AWS = require('aws-sdk'); | |
| const dynamodb = new AWS.DynamoDB(); | |
| exports.hello = async (event, context) => { | |
| const promises = []; | |
| for (let i = 0; i < 1000; i++) { | |
| const params = { | |
| TableName: 'books', | |
| Item: { | |
| 'id': {S: i.toString()}, |
This file contains hidden or 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 com.fasterxml.jackson.annotation.JsonInclude; | |
| import com.fasterxml.jackson.core.JsonGenerator; | |
| import com.fasterxml.jackson.core.JsonStreamContext; | |
| import com.fasterxml.jackson.databind.*; | |
| import com.fasterxml.jackson.databind.module.SimpleModule; | |
| import com.fasterxml.jackson.databind.ser.BeanSerializerModifier; | |
| import com.fasterxml.jackson.databind.ser.PropertyWriter; | |
| import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter; | |
| import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider; | |
| import com.fasterxml.jackson.databind.type.*; |
I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.
So it might be really unintuitive at first but lambda functions have three states.
- No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
- VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
- VPC with NAT, The best of both worlds, AWS services and web.
This file contains hidden or 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 java.io.ByteArrayInputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.lang.instrument.ClassFileTransformer; | |
| import java.lang.instrument.IllegalClassFormatException; | |
| import java.lang.reflect.Field; | |
| import java.net.URL; | |
| import java.net.URLClassLoader; | |
| import java.util.Enumeration; | |
| import java.util.List; |
[StoreStore]
<volatile_store>
[StoreLoad]
<volatile_load>
[LoadLoad|LoadStore]
This file contains hidden or 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
| { | |
| "env": [ | |
| "+ env", | |
| "AWS_LAMBDA_FUNCTION_VERSION=$LATEST", | |
| "AWS_SESSION_TOKEN=**************", | |
| "AWS_LAMBDA_LOG_GROUP_NAME=/aws/lambda/lb_runCommand", | |
| "LAMBDA_TASK_ROOT=/var/task", | |
| "LD_LIBRARY_PATH=/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib", | |
| "AWS_LAMBDA_LOG_STREAM_NAME=2017/01/06/[$LATEST]8d6559c688e44b7fa175393949f6c4b2", | |
| "NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat", |
This file contains hidden or 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 java.lang.reflect.Field; | |
| import sun.misc.Unsafe; | |
| import javassist.ClassPool; | |
| import javassist.CtClass; | |
| public class ClassCopyDemo { | |
| /* | |
| <!-- Javassist dependency --> |
This file contains hidden or 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
| private static class SingleInstanceProviderWithSingleInstanceCreationGuaranteeByCAS | |
| implements SingleInstanceProvider { | |
| private static final long INSTANCE_WRAPPER_OFFSET; | |
| static { | |
| try { | |
| INSTANCE_WRAPPER_OFFSET = | |
| UNSAFE.objectFieldOffset( | |
| SingleInstanceProviderWithSingleInstanceCreationGuaranteeByCAS.class. |