Skip to content

Instantly share code, notes, and snippets.

View renganatha10's full-sized avatar

Renganatha Arunachalam renganatha10

  • Bangalore
View GitHub Profile
@renganatha10
renganatha10 / vpc.yml
Created September 27, 2020 06:46
Cloud Formation for Deep Dive VPC
Resources:
VPC:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.1.0.0/16
EnableDnsSupport: true
EnableDnsHostnames: true
Tags:
- Key: Name
Value: !Sub ${AWS::StackName}-web-pub
SELECT (SELECT pl.id, pl."postId" FROM "PostLikes" as pl where "Posts".id = pl."postId" ) as postCount, "Posts"."id" as "postId" FROM "Posts"
INNER JOIN "Users" as "user" ON "Posts"."userId" = "user"."id"
WHERE "Posts"."userId" = '40f7198d-6851-4e19-94fb-df0094b84bb6'
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"prettier",
"prettier/react",
"prettier/@typescript-eslint"
],
{
"workbench.colorTheme": "Night Owl",
"git.enableSmartCommit": true,
"javascript.format.insertSpaceBeforeFunctionParenthesis": false,
"emmet.syntaxProfiles": {
"javascript": "jsx"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.fontFamily": "Monaco",
"editor.fontSize": 14,
{
"parser": "babel-eslint",
"env": {
"browser": false,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
@renganatha10
renganatha10 / usual-compose-graphql.js
Created November 21, 2018 18:54
With usual Compose and GraphQL from react apollo
import React, { PureComponent } from 'react';
import { View, Text } from 'react-native';
import { graphql, compose } from 'react-apollo';
import ErrorComponent from './components/ErrorComponent';
import LoadingComponent from './components/Loader';
import GET_LINEITEMS from './query/LineItem/GET_LINEITEMS';
import GET_DELIVERABLE_LIST from './query/Deliverables/GET_DELIVERABLE_LIST';
import GET_PROJECTROLE from './query/ProjectRoles/GET_PROJECTROLE';
@renganatha10
renganatha10 / common-graphql-hoc.js
Created November 21, 2018 18:14
Common GraphQL HOC to handle Common Error and Loading state and its component
import React from 'react';
import { graphql, compose } from 'react-apollo';
// Common Loading Component
import LoadingComponent from './../components/Loader';
// Common Error Component
import ErrorComponent from './../components/ErrorComponent';
const withCommonQueries = ({ queries }) => SuccessComponent => {
const CommonQueryComponent = props => {
try {
@renganatha10
renganatha10 / composed-graphql-using-commonhoc.js
Last active November 21, 2018 18:58
Multiple graphql composed in single component using common Higher order component
import React, { PureComponent } from 'react';
import { View, Text } from 'react-native';
// No Need to Import Loading and error component every where
import withCommonQuery from './hoc/withCommonQueries';
import GET_LINEITEMS from './query/LineItem/GET_LINEITEMS';
import GET_DELIVERABLE_LIST from './query/Deliverables/GET_DELIVERABLE_LIST';
import GET_PROJECTROLE from './query/ProjectRoles/GET_PROJECTROLE';
class Dummy extends PureComponent {
[
{
"title": "100",
"symbol": "💯",
"keywords":
"hundred points symbol symbol wow wow win win perfect perfect parties parties"
},
{
"title": "1234",
"symbol": "🔢",
@renganatha10
renganatha10 / code_setting.json
Created June 7, 2018 06:12
Vscode User Settings
{
"git.enableSmartCommit": true,
"emmet.syntaxProfiles": {
"javascript": "jsx"
},
"editor.fontFamily": "Avenir Light, Monaco, 'Courier New', monospace",
"editor.fontSize": 13,
"eslint.enable": true,
"eslint.autoFixOnSave": true,