View main.tf
This file contains 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
provider "google" { | |
project = "<project>" | |
region = "us-central1" | |
} | |
data "google_client_config" "default" {} | |
provider "kubernetes" { | |
load_config_file = false | |
host = "https://${module.gke.endpoint}" |
View complexityExample2.php
This file contains 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
<?php | |
sumOfPrimes(int max): int { | |
$total = 0; | |
for (int i = 1; i <= max; ++i) { | |
for (int j = 2; j < i; ++j) { | |
if (i % j == 0) { | |
continue; | |
} | |
} | |
total += i; |
View complexityExample.php
This file contains 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
<?php | |
public function getWords(int number): string | |
{ | |
switch (number) { | |
case 1: | |
return "one"; | |
case 2: | |
return "a couple"; | |
case 3: | |
return “a few”; |
View diacritics.js
This file contains 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
function removeDiacritics (s) { | |
if (!removeDiacritics.translate_re) removeDiacritics.translate_re = new RegExp('[' + Object.keys(latinMap).join('') + ']', 'g') | |
return (s.replace(removeDiacritics.translate_re, function (match) { | |
return latinMap[match] | |
})) | |
} | |
const latinMap = { | |
'Á': 'A', | |
'Ă': 'A', |