Skip to content

Instantly share code, notes, and snippets.

View soorajshankar's full-sized avatar
🏠
Working from home

Sooraj soorajshankar

🏠
Working from home
View GitHub Profile
**Privacy Policy**
Sooraj Sanker built the Math Race app as a Free app. This SERVICE is provided by Sooraj Sanker at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which are accessible at Math Race unless otherwise defined in this Privacy Policy.
{
"version": "v1",
"supergraph": {
"objects": [
{
"definition": {
"allowRoleEmulationBy": "admin",
"mode": {
"webhook": {
"method": "Post",
@soorajshankar
soorajshankar / 300 Tables PG SQL
Created February 23, 2023 10:39
300 Tables SQL
CREATE TABLE "Album0"("AlbumId" INT NOT NULL, "Title" VARCHAR(160) NOT NULL);
CREATE TABLE "Album1"("AlbumId" INT NOT NULL, "Title" VARCHAR(160) NOT NULL);
CREATE TABLE "Album2"("AlbumId" INT NOT NULL, "Title" VARCHAR(160) NOT NULL);
CREATE TABLE "Album3"("AlbumId" INT NOT NULL, "Title" VARCHAR(160) NOT NULL);
CREATE TABLE "Album4"("AlbumId" INT NOT NULL, "Title" VARCHAR(160) NOT NULL);
CREATE TABLE "Album5"("AlbumId" INT NOT NULL, "Title" VARCHAR(160) NOT NULL);
CREATE TABLE "Album6"("AlbumId" INT NOT NULL, "Title" VARCHAR(160) NOT NULL);
CREATE TABLE "Album7"("AlbumId" INT NOT NULL, "Title" VARCHAR(160) NOT NULL);
CREATE TABLE "Album8"("AlbumId" INT NOT NULL, "Title" VARCHAR(160) NOT NULL);
CREATE TABLE "Album9"("AlbumId" INT NOT NULL, "Title" VARCHAR(160) NOT NULL);
@soorajshankar
soorajshankar / docker-compose.yaml
Last active March 5, 2021 12:18
Deploy Hasura 2 - with 2 PostgreSQL and mssql
services:
postgres:
image: postgres:12
restart: always
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: postgrespassword
docker-compose up --build --force-recreate && docker run \
-e GIT_TOKEN=<> \
-e GIT_EMAIL=soorajshankar@gmail.com \
-e GIT_REMOTE=https://soorajshankar:<>@github.com/soorajshankar/auto-test.git \
-e GIT_REPO_NAME=auto-test \
-e GIT_REPORTS_DIR=stage12 \
-e GIT_NAME=soorajshankar \
-it app_graphql-bench query \
--config https://gist.githubusercontent.com/soorajshankar/****/config.yaml \
-o reports.json
{
"editor.fontFamily": "FiraCode-Retina",
"editor.fontLigatures": true,
"workbench.sideBar.location": "right",
"git.autofetch": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"window.zoomLevel": 1,
"git.enableSmartCommit": true,
@soorajshankar
soorajshankar / config.yaml
Created August 21, 2020 11:26
hasura bench test
url: http://localhost:8080/v1/graphql
headers:
X-Hasura-Admin-Secret: my-secret
queries:
- name: InsertDeviceData
tools: [ autocannon]
execution_strategy: REQUESTS_PER_SECOND
duration: 10s
rps: 400
assert:
@soorajshankar
soorajshankar / bestPractices.md
Last active May 17, 2020 07:09
coding best practices proposal

Error Handling

Avoid accessing values with multi level path

  1. Avoid accessing value from objects directly with more than 2 levels.
  2. Defaulting values will results in better error handling.
// Currently
{data.schema.value}
@soorajshankar
soorajshankar / MainActivity.kt
Created July 25, 2019 16:36
Android Digital Twin
val sensorManager = getSystemService(Context.SENSOR_SERVICE) as SensorManager
var gyroscopeSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR)
@soorajshankar
soorajshankar / AndroidManifest.xml
Last active July 25, 2019 16:29
Android Digital Twin
<uses-feature android:name="android.hardware.sensor.gyroscope" android:required="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />