Skip to content

Instantly share code, notes, and snippets.

View amarjandu's full-sized avatar
🏍️

amar amarjandu

🏍️
  • bay area, CA
  • 11:29 (UTC -07:00)
View GitHub Profile
/*
* Enables contextual overrides to generation of mocked values, there is a constraint here is that
* the underlying library only allows MockeryMapper to be used on `string` values, schema's with values such as
* `number` or `boolean` will not be mocked with contextual values at the moment.
* TODO: enhance this to allow any context to be considered for any value type.
* */
export function mockeryMapperWithContext<T extends Record<string, string>>(
context: T,
) {
return (keyName: string): FakerFunction | undefined => {
TES-ajandu:tcloud amar$ uptime
8:20 up 54 days, 15:59, 5 users, load averages: 16.69 9.23 7.29
@amarjandu
amarjandu / gist:ba2171cba652a4f92e643942d14301a4
Created April 12, 2021 21:09
diff between proposed openapi spec and the current spec on develop
This file has been truncated, but you can view the full file.
4c4
< "title": "azul-service-amar",
---
> "title": "azul-service-dev",
93c93
< "description": "\nThe checked resources\nare healthy.\n\nThe response consists of the following keys:\n\n* `api_endpoints` \nIndicates whether important service API endpoints are operational.\n* `other_lambdas` \nIndicates whether the companion REST API responds to HTTP requests.\n* `progress` \nThe number of Data Store bundles pending to be indexed and the number\nof index documents in need of updating.\n* `elasticsearch` \nIndicates whether the Elasticsearch cluster is responsive.\n* `queues` \nReturns information about the SQS queues used by the indexer.\n* `up` \nindicates the overall result of the health check\n\n\nThe top-level `up` key of the response is\n`true`.\n\n\nAll of the nested `up` keys\nare `true`.\n",
---
> "description": "\nThe checked resources\nare healthy.\n\nThe response consists of the following keys:\n\n* `elasticsearch` \nIndicates whether the Elasticsearch cluster is respon
@amarjandu
amarjandu / simple-reproduction.py
Created March 19, 2021 21:58
moto presigned url failure, simple reproduction
import moto
import boto3
import requests
import tempfile
from botocore.config import Config
region = 'us-gov-west-1'
bucket_name = 'banana-slugs'
test_config = Config(region_name=region)
@amarjandu
amarjandu / moto-method-not-implemented.py
Created March 19, 2021 20:23
A reprodiuction for the presigned url issue w/ moto
import moto
import boto3
import requests
import tempfile
from botocore.config import Config
region = 'us-gov-west-1'
bucket_name = 'banana-slugs'
test_config = Config(region_name=region)
@amarjandu
amarjandu / zhome-noframes.html
Created November 2, 2020 16:43
Zhome changes
<HTML>
<HEAD>
<META name="description" content="Internet Z Car Club. Datsun / Nissan Z Car Home Page. An international Z Car Club w/6000+ members world wide. Growing collection of information about buying, selling, and owning a Z. Detailed technical articles, pics, news, regional clubs.">
<META name="keywords" content="Datsun, Nissan, Z, Car, Club, 240Z, 260Z, 280Z, 280ZX, 300ZX">
<TITLE>Datsun-Nissan Z Car Home Page</TITLE>
</HEAD>
@amarjandu
amarjandu / System Design.md
Created October 20, 2017 03:20 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?