$ aws apigateway get-client-certificates
{
"items": [
{
"clientCertificateId": "rrixc5i",
"pemEncodedCertificate": "-----BEGIN CERTIFICATE-----\r\XXXXXXXXXXBfBWu7W7ufgwDQYJKoZIhvcNAQELBQAwNDELMAkGA1UE\r\nBhMCVVMxEDAOBgNVBAcTB1NlYXR0bGUxEzARBgNVBAMTCkFwaUdhdGV3YXkwHhcN\r\nMjAwNTI5MTQyMjU5WhcNMjEwNTI5MTQyMjU5WjA0MQswCQYDVQQGEwJVUzEQMA4G\r\nA1UEBxMHU2VhdHRsZTETMBEGA1UEAxMKQXBpR2F0ZXdheTCCASIwDQYJKoZIhvcN\r\nAQEBBQADggEPADCCAQoCggEBAJxlRwofEJNcEroHBl569P5imccqfA1/DiSl6oMY\r\npt1BRXCK/MBwoIQVBCNZ4aHSeLYqg3VgtwIBTJE81g59Iw7sKM6Cb+w6vwFZczRS\r\nf87Xl5KkXKlbkvllM+s1SDBga8SF+LA0ux2bXyk8rviLYB+9YtOahbxJNX0sba+e\r\ncY2WYiNC5MeYqMPanbz8nBib1sMg7CbWoYs4aKPA8Y3fvWKNd69PwlG5ifQ+ZMHe\r\nMF7HNt4+Q9POdlw56L5wp4vT4BH0jNuGlc5HUxDZtsMYIXCUzOum4NyyHdDY3Bsl\r\nqR31t0grAt0l3Z7PUj+sUB7SwhEs4+9/pBSCAE5ou5p4RZ0CAwEAATANBgkqhkiG\r\n9w0BAQsFAAOCAQEAKkIkROSDWyEsVGE2wamDL/X
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
provider "aws" { | |
region = "us-west-2" | |
} | |
data "aws_canonical_user_id" "current_user" {} | |
resource "aws_s3_bucket" "deployment_bucket" { | |
bucket = "limpidfox-lambdas-dev" | |
acl = "private" | |
server_side_encryption_configuration { |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Linq; | |
public class Graph<T> { | |
Dictionary<T,List<T>> vertices; | |
Dictionary<T,bool> marked; | |
Dictionary<T,int> componentIds; | |
Dictionary<T,bool> color; |
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
using System.Collections.Generic; | |
internal class BFSPaths<T> | |
{ | |
Graph<T> g; | |
T s; | |
Dictionary<T,T> edgeTo = new Dictionary<T,T>(); | |
public BFSPaths(Graph<T> g, T s) | |
{ |
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 void TestWordChains() | |
{ | |
var dict = File.ReadAllLines("words.txt").Where(w=>!w.Contains("'")).ToList(); | |
var stopWatch = new Stopwatch(); | |
stopWatch.Start(); | |
var path = MakeWordChains(dict,"game","over"); | |
stopWatch.Stop(); | |
System.Console.WriteLine($"Time in Seconds: {stopWatch.ElapsedMilliseconds/1000.0}"); | |
path.Dump(); | |
AssertAreEqual(10,path.Count); |
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
void Main() | |
{ | |
var n = new NuggetSaver(7,11); | |
(n.BestOrder(20) == (3, 0)).Dump(); | |
(n.BestOrder(100) == (8, 4)).Dump(); | |
(n.BestOrder(-20) == (0, 0)).Dump(); | |
(n.BestOrder(1000000) == (142854, 2)).Dump(); | |
} | |
class NuggetSaver |
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
void Main() | |
{ | |
var n = new NuggetSaver(7,11); | |
(n.OrderNuggets(20) == (3, 0)).Dump(); | |
(n.OrderNuggets(100) == (8, 4)).Dump(); | |
(n.OrderNuggets(-20) == (0, 0)).Dump(); | |
} | |
class NuggetSaver |
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
void Main() | |
{ | |
var p1 = new List<(int x, int y)> { | |
(1,1), (1,3), (3,1), (3,3), (2,2) | |
}; | |
var p2 = new List<(int x, int y)> { | |
(1,1), (1,3), (3,1), (3,3), (4,1), (4,3) | |
}; |
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
static void RunMushroomChamp() { | |
var A = new int[] {2, 3, 7, 5, 1, 3, 9}; | |
AssertAreEqual(25, MushroomChamp(trail:A, maxSteps:6, startPos:4)); | |
AssertAreEqual(30, MushroomChamp(trail:A, maxSteps:15, startPos:4)); | |
AssertAreEqual(6, MushroomChamp(trail:A, maxSteps:1, startPos:4)); | |
AssertAreEqual(18, MushroomChamp(trail:A, maxSteps:4, startPos:0)); | |
AssertAreEqual(18, MushroomChamp(trail:A, maxSteps:3, startPos:6)); | |
AssertAreEqual(2, MushroomChamp(trail: new[]{2}, maxSteps:1, startPos: 0)); | |
AssertAreEqual(2, MushroomChamp(trail: new[]{2}, maxSteps:1, startPos:-1)); | |
AssertAreEqual(2, MushroomChamp(trail: new[]{2}, maxSteps:1, startPos: 1)); |
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
void Main() | |
{ | |
Console.WriteLine( | |
LongestMatch("a8dgk1ndflg0s84142kd","093841tgpngh044flg0s84142123rbbdja7") | |
); | |
} | |
string LongestMatch(string small, string large) | |
{ | |
string currLargest = ""; |