Skip to content

Instantly share code, notes, and snippets.

View ksindi's full-sized avatar
🚀
Shipping

Kamil Sindi ksindi

🚀
Shipping
View GitHub Profile

Guidelines for API Design and Performance

Design Principles

Understanding HTTP Methods

  1. Clearly distinguish between POST, PATCH, and PUT to ensure proper usage and behavior in API interactions.

Endpoint Naming Conventions

use std::fs::File;
use std::{
collections::BTreeMap,
path::PathBuf,
time::{Duration, UNIX_EPOCH},
};
use anyhow::Result;
use chrono::prelude::*;
use clap::{arg, command, Parser};
use aws_sdk_dynamodb::model::AttributeValue;
use serde_json::Value;
fn parse_item(value: Value) -> HashMap<String, AttributeValue> {
match value_to_item(value) {
AttributeValue::M(map) => map,
other => panic!("can only insert top level values, got {:?}", other),
}
}

2022-XX-XX PROJECT NAME

Author
Date
PRD URL

Summary

This is your tech spec’s abstract: the who/what/when/where/why of your entire proposal. Keep it short (max 2 paragraphs).

@ksindi
ksindi / docker-compose.yml
Created August 31, 2021 16:07 — forked from borischerkasky/docker-compose.yml
localstack docker compose
version: "3"
services:
localstack:
image: localstack/localstack
ports:
- "4568-4576:4568-4576"
- "${PORT_WEB_UI-8080}:${PORT_WEB_UI-8080}"
environment:
- DOCKER_HOST=unix:///var/run/docker.sock
@ksindi
ksindi / ssm_parameter_store.py
Created August 17, 2021 01:46 — forked from nqbao/ssm_parameter_store.py
Python class to provide a dictionary-like interface to access AWS SSM Parameter Store easily
# Copyright (c) 2018 Bao Nguyen <b@nqbao.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@ksindi
ksindi / Historical Real Estate.ipynb
Last active January 4, 2021 04:15
Historical real estate data from Realtor.com
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Contributing Guidelines

  1. Only assign yourself 1-2 tickets at a time
  2. Split up tickets that take longer than 3 days
  3. Always use ISO-8601 internally
  4. Always use UTC internally unless it's for future datetimes
  5. Always use UTF-8 internally
  6. Commit messages can complete the following sentence in under 50 characters: "If applied, this commit will "
  7. Always rebase from master and squash "maintenance" commits (WIP, etc.)
  8. Make PRs short in time and length - max of 4 days and 400 lines of code
@ksindi
ksindi / kubernetes_add_service_account_kubeconfig.sh
Created February 9, 2019 00:11 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
package main
import (
"bytes"
"fmt"
"gopkg.in/yaml.v2"
)
var data = `