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
#!/bin/bash | |
set -e | |
# --- CONFIGURATION --- | |
PARALLELS_VM_NAME="Kali Linux 2024.2 ARM64" # Name of your Parallels VM | |
RAW_IMAGE="kali-exported.raw" | |
S3_BUCKET="domhallan-kali-linux-bucket" | |
AWS_REGION="us-east-1" | |
# shellcheck disable=SC2034 | |
PACKER_TEMPLATE="kali-aws.json" |
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
# main.tf | |
terraform { | |
required_version = "~> 1.10.0" | |
required_providers { | |
aws = { | |
source = "hashicorp/aws" | |
version = "~> 5.82.0" | |
} |
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
spring.application.name=sb-ecomm | |
# Expose more endpoints for IntelliJ integration | |
management.endpoints.web.exposure.include=* | |
management.endpoint.health.show-details=always | |
management.endpoint.health.probes.enabled=true | |
# Enable Spring Boot Admin features that IntelliJ uses | |
spring.application.admin.enabled=true | |
spring.jmx.enabled=true |
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
4:45:05 PM | CREATE_FAILED | AWS::CloudFormation::Stack | PartitioningStackN...ckResourceEE21A7DB | |
Embedded stack arn:aws:cloudformation:us-west-2:844077369820:stack/AmazonConnectDataAnalyticsSampleBackend-PartitioningStackNestedStackPartitioningStackN-6LL8UQD53WXV/6ca7b0e0-6d38-11ef-8fb9-0241490f74bd was not successfully created: The following resource(s) failed to create: [A | |
thenaResultsS3bucketAccessLogsDA26D92E]. | |
:x: AmazonConnectDataAnalyticsSampleBackend failed: Error: The stack named AmazonConnectDataAnalyticsSampleBackend failed to deploy: CREATE_FAILED (The following resource(s) failed to create: [PartitioningStackNestedStackPartitioningStackNestedStackResourceEE21A7DB]. ) | |
at FullCloudFormationDeployment.monitorDeployment (/home/ubuntu/amazon-connect-data-analytics-sample/cdk-stacks/node_modules/aws-cdk/lib/index.js:426:10236) | |
at processTicksAndRejections (node:internal/process/task_queues:96:5) | |
at async Object.deployStack2 [as deployStack] (/home/ubuntu/amazon-connect-data-analyt |
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
.mtk3 { | |
font-family: Operator Mono Lig; | |
color: #00ffff; | |
} | |
.part.sidebar { | |
box-shadow: 0px 0px 50px rgba(0, 0, 0, 0.25); | |
} | |
.line-numbers { |
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
package main | |
import ( | |
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" | |
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" | |
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" | |
) | |
func main() { | |
pulumi.Run(func(ctx *pulumi.Context) error { |
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
func GetEventByID(id int64) (*Event, error) { | |
query := `SELECT * FROM events WHERE id = ?` | |
row := db.DB.QueryRow(query, id) | |
var event Event | |
err := row.Scan(&event.ID, &event.Name, &event.Description, &event.Location, &event.DateTime, &event.UserID) | |
if err != nil { | |
return nil, err | |
} | |
return &event, nil |
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
def dynamic_reducer(numbers, operator): | |
result = numbers[0] | |
for i in range(1, len(numbers)): | |
if operator == "+": | |
result += numbers[i] | |
elif operator == "-": | |
result -= numbers[i] | |
elif operator == "*": | |
result *= numbers[i] | |
elif operator == "/": |
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
// Hook flow | |
// https://github.com/donavon/hook-flow | |
// http://localhost:3000/isolated/examples/hook-flow.js | |
// PLEASE NOTE: there was a subtle change in the order of cleanup functions | |
// getting called in React 17: | |
// https://github.com/kentcdodds/react-hooks/issues/90 | |
import * as React from 'react' |
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
# frozen_string_literal: true | |
def longest_word(sentence) | |
split_sentence = sentence.split | |
my_longest_word = split_sentence.max_by { |word| word.size } | |
same_length_words = split_sentence.select { |word| word.size == my_longest_word.size } | |
if same_length_words.empty? | |
my_longest_word | |
else | |
same_length_words.last |
NewerOlder