Skip to content

Instantly share code, notes, and snippets.

View bharat-tiwari's full-sized avatar

Bharat Tiwari bharat-tiwari

View GitHub Profile
@bharat-tiwari
bharat-tiwari / delete.ts
Created December 24, 2018 18:49
NoteWordy API - lambda for delete word
import { APP_CONSTANTS } from '../../config/app_constants';
import getResponse from '../../utils/responseUtils';
import * as AWS from "aws-sdk";
const dynamoDb = new AWS.DynamoDB.DocumentClient({
'region': 'us-east-1'
});
export async function main(event, context, callback) {
@bharat-tiwari
bharat-tiwari / delete.json
Created December 24, 2018 19:09
Notewordy API - mock test data to test delete endpoint
{
"pathParameters": {
"id": "replace-this-with-the-id-of-an-item-you-have-in-your-dynamoDb-table"
},
"requestContext": {
"identity": {
"cognitoIdentityId": "TEST-LOCAL-USER-A"
}
}
}
@bharat-tiwari
bharat-tiwari / footer1.md
Last active January 2, 2019 18:04
Footer1
← Prev:Register iOS app for Google Sign-in 🏠 Next:Add Google Sing-in for iOS→
@bharat-tiwari
bharat-tiwari / TestDocumentationBuilding.jsx
Last active May 3, 2019 21:26
Test component to test styleguidist document generation
import React from "react";
import PropTypes from "prop-types";
/**
*
* A Test component created to test React Styleguidist documentation
* @export
* @class TestDocumentationBuilding
* @extends {React.Component}
*/
@bharat-tiwari
bharat-tiwari / App.js
Last active May 3, 2019 20:34
App component with TestDocumentationBuilding
import React from "react";
import logo from "../assets/images/logo.svg";
import "./App.css";
import TestDocumentationBuilding from "../components";
function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
import React from "react";
import PropTypes from "prop-types";
/**
*
* Button that counts how many times it was pressed and exposes a `@public` method to reset itself.
* @export
* @class TestDocumentationBuilding
* @extends {React.Component}
*/
@bharat-tiwari
bharat-tiwari / styleguide.config.js
Created May 3, 2019 21:17
styleguidist config js
module.exports = {
components: ["src/**/*.{jsx,tsx}"],
ignore: [
"**/index.{js,jsx,ts,tsx}",
"**/__tests__/**",
"**/*.test.{js,jsx,ts,tsx}",
"**/*.spec.{js,jsx,ts,tsx}",
"**/*.d.ts"
]
};
// Define our themes: one for day and one for night
export const dayTheme = {
appBG: "#37d8e6",
normalText: "#ffdd00",
hlText: "#f1c40f", //Highlighted Text
primary: {
bg: "#ddd",
text: "#000"
}
};
import styled from "@emotion/styled";
export const ContentsDiv = styled("div")`
background-color: ${props => props.theme.contentsBG || "#666"};
color: ${props => props.theme.normalText || "#ddd"};
padding: 10px;
`;
export const commonTheme = {
primary: {
bg: "#ddd",
textColor: "#000"
},
warning: {
bg: "#f4d142",
textColor: "#000"
}
};