Skip to content

Instantly share code, notes, and snippets.

View siddharthlatest's full-sized avatar
👨‍💻
Focusing

Siddharth Kothari siddharthlatest

👨‍💻
Focusing
View GitHub Profile
@siddharthlatest
siddharthlatest / SearchBar.md
Last active July 11, 2021 08:04
SearchBar UI component specification

SearchBar UI Component

Create a React component (say SearchBar) which creates a searchbar UI that searches on a provided dataset and displays the matches as suggestions.

The component's usage should look as follows:

<SearchBar
  data={[{..}, {..}]}
 fields={["email", "company"]}
@siddharthlatest
siddharthlatest / github-dataset.json
Created April 2, 2021 11:48
This is the public dataset of popular Github repositories
This file has been truncated, but you can view the full file.
[
{
"avatar": "https://avatars1.githubusercontent.com/u/1449905?v=4",
"created": "2014-02-15T16:45:10Z",
"description": "Flappy Bird hack using Reinforcement Learning",
"forks": 207,
"fullname": "SarvagyaVaish~FlappyBirdRL",
"language": "JavaScript",
"name": "FlappyBirdRL",
"owner": "SarvagyaVaish",
@siddharthlatest
siddharthlatest / arc.sh
Last active August 14, 2020 21:53 — forked from lakhansamani/arc.sh
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
generation: 1
name: arc
spec:
selector:
@siddharthlatest
siddharthlatest / benchmark_v7.28.0.md
Last active January 15, 2021 09:39
Benchmarks Comparison: Baseline - ElasticSearch upstream v/s Contender - Arc v7.28.0 Release
Comparing baseline 
  Race ID: es-raw 
  Race timestamp: 2020-06-15 16:35:44 
  Challenge: append-no-conflicts 
  Car: external 

with contender 
  Race ID: arc_7.28.0_retest_notemplate_logging_on 
  Race timestamp: 2020-06-27 10:51:57 
@siddharthlatest
siddharthlatest / snippet.json
Created February 4, 2019 09:59
An ElasticSearch Aggregation example
curl --location --request POST "https://scalr.api.appbase.io/RESTAPI/users/_search" \
--header "Authorization: Basic YjdqV2hVSjhYOjcyYmI2ZmMxLWRkZjItNDU5Zi1iNGM3LWU2NzgwNjQyM2MyZA==" \
--header "Content-Type: application/json" \
--data '{
"size": 0,
"aggs": {
"my-terms-agg": {
"terms": {
"field": "name"
}
<ResultCard
componentId="results"
dataField="original_title"
pagination={true}
paginationAt="bottom"
pages={5}
size={12}
Loader="Loading..."
showResultStats={true}
noResults="No results were found..."
<SingleRange
componentId= "revenue-list"
dataField= "ran_revenue"
className= "revenue-filter"
data={[
{ start: 0, end: 1000, label: "< 1M" },
{ start: 1000, end: 10000, label: "1M-10M" },
{ start: 10000, end: 500000, label: "10M-500M" },
{ start: 500000, end: 1000000, label: "500M-1B" },
{ start: 1000000, end: 10000000, label: "> 1B" }
<MultiList
componentId="genres-list"
dataField="genres_data.raw"
className="genres-filter"
size={20}
sortBy="asc"
queryFormat="or"
selectAllLabel="All Genres"
showCheckbox={true}
showCount={true}
@siddharthlatest
siddharthlatest / App.css
Created January 3, 2018 01:58
booksearch app styles
.navbar {
width: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 1;
display: flex;
align-items: center;
background-color: #0B6AFF;
color: #fff;
@siddharthlatest
siddharthlatest / App.js
Last active January 3, 2018 01:57
booksearch app UI
import React, { Component } from 'react';
import {
ReactiveBase,
DataSearch,
SingleRange,
ResultCard
} from '@appbaseio/reactivesearch';
import './App.css';
class App extends Component {