Skip to content

Instantly share code, notes, and snippets.

View rajeshpv's full-sized avatar

Rajesh Rao rajeshpv

  • Consultant
  • Cary NC
  • 22:15 (UTC -04:00)
View GitHub Profile
@rajeshpv
rajeshpv / k8-ping.sh
Created February 12, 2025 00:43
Pings every 10 secs with 1 sec timeout to simulate k8 live probe test
#!/bin/bash
# have export APP_URL="http://service.com/"
LOG_FILE="output-k8-ping.log"
while true; do
# Run curl and capture output + exit code
# note: curl is given 1 sec of timeout else to error out (the -m 1)
OUTPUT=$(curl -m 1 -o /dev/null -s -w "{ DNS_Lookup: %{time_namelookup}, TCP_Connect: %{time_connect}, SSL_Handshake: %{time_appconnect}, TTFB: %{time_starttransfer}, Total_Time: %{time_total} }s\n" "$APP_URL")
EXIT_CODE=$?
db.collectionA.insertMany([
    { "_id": 1, "field1A": "A", "field2A": 100 },
    { "_id": 2, "field1A": "B", "field2A": 200 }

]);

db.collectionB.insertMany([
 { "_id": 1, "field1B": "A", "field2B": 100 },
customer_id first_name last_name email phone
9570aa41 FirstName_0 LastName_0 [email protected] 555-346-2017
a19ed48f FirstName_1 LastName_1 [email protected] 555-245-3957
50dc2c60 FirstName_2 LastName_2 [email protected] 555-346-8574
8d4efb02 FirstName_3 LastName_3 [email protected] 555-135-1604
590dabf6 FirstName_4 LastName_4 [email protected] 555-646-9251
59b4ff89 FirstName_5 LastName_5 [email protected] 555-517-9440
f01fbd86 FirstName_6 LastName_6 [email protected] 555-903-3764
40433ae9 FirstName_7 LastName_7 [email protected] 555-669-1841
e23fb906 FirstName_8 LastName_8 [email protected] 555-717-5625
order_id customer_id order_date amount status
1c92ff7b cdab7200 2023-01-01 40.76 Pending
05b3bde1 d71feebd 2023-01-02 217.2 Cancelled
72f48718 031d760a 2023-01-03 142.03 Pending
2b9c0240 ef21b0e1 2023-01-04 427.12 Completed
574ce318 fefd0560 2023-01-05 211.29 Cancelled
cd9c285f 83054752 2023-01-06 307.7 Completed
c24fe3ff ff5769ea 2023-01-07 443.99 Completed
58e08398 031d760a 2023-01-08 438.17 Cancelled
a1503b9a fc07531f 2023-01-09 362.1 Cancelled

Do you call this Rhetoric Message or conversation !?, I feel it is bullying !!! :) or thinking - I can say what I like and you cannot do anything :)

image image

@rajeshpv
rajeshpv / api-list.md
Created October 4, 2024 02:05
public api for facility details

Here is a summary of public or commercial APIs for facility details like building area, living capacity, etc., based on postal address:

API Name Purpose Data Provided Access Website
Zillow API Provides real estate data Home size, lot area, home values, historical data Requires registration Zillow API
Estated API Comprehensive property data Lot size, building area, rooms, property tax, owner info

Tools like StrongDM are designed to help streamline and secure access to multiple VPNs and other infrastructure without needing to manage separate VPN logins for each connection. StrongDM provides centralized access control, monitoring, and logging for infrastructure like databases, servers, and Kubernetes clusters, often replacing the need for traditional VPNs.

If you're looking for similar tools or solutions that provide a way to manage multiple VPN logins through a single point of control, here are a few options and approaches:

1. StrongDM

  • StrongDM allows teams to access critical infrastructure securely without the need for individual VPN logins. It uses a single sign-on (SSO) approach for multiple infrastructures (like VPNs, databases, and servers) while handling encryption and logging for all sessions.
  • It provides role-based access controls (RBAC), allowing you to define who can access which resources across your infrastructure, no matter where they are locat
@rajeshpv
rajeshpv / centralvpn-access.md
Created September 20, 2024 06:04
I had heard fo StrongDM from one of friends where they proxy K8's and postgres db's etc.,, I was wondering we shoul dlook/have this to reduce multiple VPN connections directly from dev-host liek us.

Tools like StrongDM are designed to help streamline and secure access to multiple VPNs and other infrastructure without needing to manage separate VPN logins for each connection. StrongDM provides centralized access control, monitoring, and logging for infrastructure like databases, servers, and Kubernetes clusters, often replacing the need for traditional VPNs.

If you're looking for similar tools or solutions that provide a way to manage multiple VPN logins through a single point of control, here are a few options and approaches:

1. StrongDM

  • StrongDM allows teams to access critical infrastructure securely without the need for individual VPN logins. It uses a single sign-on (SSO) approach for multiple infrastructures (like VPNs, databases, and servers) while handling encryption and logging for all sessions.
  • It provides role-based access controls (RBAC), allowing you to define who can access which resources across your infrastructure, no matter where they are locat
@rajeshpv
rajeshpv / spec.json
Created July 2, 2024 18:12
Vega-Lite spec from Tue Jul 02 2024
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "A bar chart that sorts the y-values by the x-values.",
"data": {"url": "data/population.json"},
"transform": [{"filter": "datum.year == 2000"}],
"height": {"step": 17},
"mark": "bar",
"encoding": {
"y": {"field": "age", "type": "ordinal", "sort": "-x"},
"x": {"aggregate": "sum", "field": "people", "title": "population"}
  • can buy from here