$ terraform taint resource.id
resource.id refers to the resource block name and resource ID to taint. Review the resource block we
previously created:
resource "aws_instance" "example" {
ami = "ami-b374d5a5"
instance_type = "t2.micro"
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
{ | |
"inputs": [ | |
{ | |
"type": "promptString", | |
"id": "github-pat", | |
"password": true, | |
"description": "GitHub Personal Access Token (PAT, https://github.com/settings/personal-access-tokens/new)" | |
} | |
], | |
"servers": { |
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 os | |
import openai | |
import requests | |
from pprint import pprint | |
import dotenv | |
dotenv.load_dotenv() | |
openai_api_key = os.environ.get("OPENAI_API_KEY") | |
bing_search_api_key = os.environ['BING_SEARCH_V7_SUBSCRIPTION_KEY'] |
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 ( | |
"bufio" | |
"bytes" | |
"context" | |
"encoding/json" | |
"errors" | |
"fmt" | |
"net/http" |
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
library(rb3) | |
library(tidyverse) | |
top_weight <- function(.data, n = 10) { | |
top_10 <- .data |> | |
arrange(desc(weight)) |> | |
slice_head(n = n) |> | |
select(symbol, weight) | |
total_weight <- sum(top_10$weight) | |
others <- tibble( |
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
@Configuration | |
public class BeanValidationConfig { | |
/** | |
* The idea here is to configure Hibernate to use the same ValidatorFactory used by Spring, | |
* so that Hibernate will be able to handle custom validations that need to use dependency injection (DI) | |
*/ | |
@Bean | |
public HibernatePropertiesCustomizer hibernatePropertiesCustomizer(final Validator validator) { | |
return new HibernatePropertiesCustomizer() { |
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
/** | |
* Metannotation for OnConfigurationPropertiesCondition custom conditional implementation. | |
*/ | |
@Target({ElementType.TYPE, ElementType.METHOD}) | |
@Retention(RetentionPolicy.RUNTIME) | |
@Documented | |
@Conditional(OnConfigurationPropertiesCondition.class) | |
public @interface ConditionalOnConfigurationProperties { | |
// properties namespace |
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
/* | |
* Available context bindings: | |
* COLUMNS List<DataColumn> | |
* ROWS Iterable<DataRow> | |
* OUT { append() } | |
* FORMATTER { format(row, col); formatValue(Object, col); getTypeName(Object, col); isStringLiteral(Object, col); } | |
* TRANSPOSED Boolean | |
* plus ALL_COLUMNS, TABLE, DIALECT | |
* | |
* where: |
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
# WSL2 network port forwarding script v1 | |
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell, | |
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter. | |
# written by Daehyuk Ahn, Aug-1-2020 | |
# Display all portproxy information | |
If ($Args[0] -eq "list") { | |
netsh interface portproxy show v4tov4; | |
exit; | |
} |
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 smtplib | |
# initialize connection to our email server, we will use Outlook here | |
smtp = smtplib.SMTP('smtp-mail.outlook.com', port='587') | |
smtp.ehlo() # send the extended hello to our server | |
smtp.starttls() # tell server we want to communicate with TLS encryption | |
smtp.login('[email protected]', 'Password123') # login to our email server |
NewerOlder