Skip to content

Instantly share code, notes, and snippets.

View siddharthlatest's full-sized avatar

Siddharth Kothari siddharthlatest

View GitHub Profile
this.getliveData = function() {
return appbaseRef.searchStream({
type: 'city',
body: {
query: {
match_all: {}
}
}
});
}
ReactDOM.render(
<StuckOnFeed />,
document.getElementById('stuckOnFeed')
)
@siddharthlatest
siddharthlatest / stackfile.yaml
Last active February 29, 2016 11:09
ElasticSearch stackfile
elasticsearch:
image: 'elasticsearch:2.2'
command: 'elasticsearch -Des.discovery.zen.minimum_master_nodes=2 -Des.cluster.name=my_app_es_1 -Des.discovery.zen.ping.unicast.hosts=elasticsearch-1:9300,elasticsearch-2:9300,elasticsearch-3:9300 -Des.network.publish_host=_ethwe:ipv4_ -Des.network.bind_host=0'
deployment_strategy: every_node
environment:
- ES_HEAP_SIZE=4g
ports:
- '9200:9200'
tags:
- elasticsearch
"visibility": "public",
"response": "yes",
"guests": 0,
"member": {
"member_id": 185034988,
"photo": "http://photos1.meetupstatic.com/photos/member/d/0/0/0/thumb_248333248.jpeg",
"member_name": "Wilma"
},
"rsvp_id": 1566804180,
"mtime": 1440266230993,
@siddharthlatest
siddharthlatest / gulpfile.js
Created May 31, 2016 06:16
Gulpfile for transpiling .jsx to .js file
var browserify = require('browserify');
var gulp = require('gulp');
var source = require("vinyl-source-stream");
var reactify = require('reactify');
gulp.task('browserify', function() {
var b = browserify({
entries: ['src/app.js'],
debug: true
});
@siddharthlatest
siddharthlatest / index.html
Last active May 31, 2016 08:19
meetupblast-react's root file
<!DOCTYPE html>
<html>
<head>
<title>Meetup</title>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="assets/style.css" />
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/appbase-js/browser/appbase.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="bower_components/typeahead.js/dist/typeahead.bundle.js"></script>
@siddharthlatest
siddharthlatest / app.js
Created May 31, 2016 08:06
meetupblast app's entry point
var React = require('react');
var ReactDOM = require('react-dom');
var Container = require('./container.jsx');
ReactDOM.render(
<div>
<Container></Container>
</div>
, document.getElementById('container'));

Container.jsx is where we define the main app container. It contains:

  1. filterContainer.jsx contains the city and topic filter components. It fires the RSVP feed based on current cities and topics selected.
    a. tag.jsx defines the actual filter component, and the checkboxing / removing methods.
  2. user.jsx displays the single user's RSVP feed UI.
    a. userImg.jsx displays the default image if user's pic can't be found.
@siddharthlatest
siddharthlatest / Container.jsx
Created May 31, 2016 20:30
Main container file
var React = require('react');
var FilterContainer = require('./filterContainer.jsx');
var User = require('./User.jsx');
var Container = React.createClass({
getInitialState: function() {
return {
users: [],
CITY_LIST: [],
TOPIC_LIST: []
var React = require('react');
var Tag = require('./tag.jsx');
var FilterContainer = React.createClass({
componentWillMount: function() {
this.fire_response();
},
fire_response: function() {
var $this = this;
streamingClient = REQUEST.GET_STREAMING_CLIENT();