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
| AssertionError: Assertion failed: | |
| sc.val['d'] == 'f' | |
| | | | | |
| | e False | |
| {'d': 'e'} |
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
| class SomeClass: | |
| def __init__(self): | |
| self.val = {'d': 'e'} | |
| def __str__(self): | |
| return str(self.val) | |
| sc = SomeClass() | |
| sc.val['d'] == 'f' |
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
| Expected: "There's a small difference" | |
| but: was "There's a huge difference" | |
| Hint: | |
| - There's a huge difference | |
| ? ^^^^ | |
| + There's a small difference | |
| ? ^^^^^ |
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/noamt/go-cldr/supplemental" | |
| "golang.org/x/text/language" | |
| ) | |
| func main() { | |
| tag, _ := language.Parse("en-US") | |
| region, _ := tag.Region() |
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
| <firstDay day="mon" territories=" | |
| 001 | |
| AD AI AL AM AN AR AT AX AZ | |
| BA BE BG BM BN BY | |
| CH CL CM CR CY CZ | |
| DE DK | |
| EC EE ES | |
| FI FJ FO FR | |
| GB GE GF GP GR | |
| HR HU |
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 reachout_test | |
| import ( | |
| "net/http" | |
| "net/http/httptest" | |
| "os" | |
| "testing" | |
| ) | |
| func Test_ReachOut_SSLExpired(t *testing.T) { |
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 expiredSSLCertificate() (*tls.Certificate, error) { | |
| priv, err := ecdsa.GenerateKey(elliptic.P521(), rand.Reader) | |
| if err != nil { | |
| return nil, fmt.Errorf("failed to generate private key: %w", err) | |
| } | |
| template := x509.Certificate{ | |
| SerialNumber: big.NewInt(1), | |
| Subject: pkix.Name{ | |
| Organization: []string{"Acme Co"}, | |
| }, |
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 reachout_test | |
| import ( | |
| "net/http" | |
| "net/http/httptest" | |
| "os" | |
| "testing" | |
| ) | |
| func Test_ReachOut(t *testing.T) { |
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 reachout | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "os" | |
| ) | |
| func ReachOut() string { | |
| host := os.Getenv("API_HOST") |
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
| resource "google_sql_database_instance" "read_replica" { | |
| name = "replica-${random_id.db_name_suffix.hex}" | |
| master_instance_name = "${var.project_id}:${google_sql_database_instance.master.name}" | |
| region = "europe-west4" | |
| database_version = "POSTGRES_11" | |
| replica_configuration { | |
| failover_target = false | |
| } |
NewerOlder