Skip to content

Instantly share code, notes, and snippets.

View christopherdro's full-sized avatar

Chris Dro christopherdro

View GitHub Profile
//
// NTRCTProfileTable.h
// Nametag
//
// Created by Christopher on 7/20/15.
// Copyright (c) 2015 650 Industries. All rights reserved.
//
#import "RCTViewManager.h"
this.props.navigator.push({
id: 'patient-notes',
data: rowData,
sceneConfig: Navigator.SceneConfigs.FloatFromRight,
navigationBar: (
<NavigationBar
title={`${rowData.lastName}, ${rowData.firstName.charAt(0)}.`}
buttonsColor="#48D1CC"
customNext={<NavigationButtons.AddNote patient={rowData} NavigationEmitter={this.props.NavigationEmitter}/>}
style={{flex: 1}}
<Navigator
ref="navigator"
renderScene={::this._renderScene}
initialRoute={{
navigationBar: (
<NavigationBar
title="Test APP"
customPrev={<NavigationButtons.Settings/>}
customNext={<NavigationButtons.AddPatient NavigationEmitter={NavigationEmitter} />}
style={{flex: 1}}
/**
* @providesModule PatientList
*/
import NavigationBar from 'react-native-navbar';
import NavigationButtons from 'NavigationButtons';
import React, { ListView, Navigator, StyleSheet, Text, TextInput, TouchableHighlight, View } from 'react-native';
import { connect } from 'react-redux/native'
@connect(state => ({
patients: state.patients
'use strict';
let React = require('react-native');
let Home = require('./entry');
let FeedbackModal = require('FeedbackModal');
let {
AppRegistry,
NativeAppEventEmitter,
View,
} = React;
#import "ViewSnapshotter.h"
#import "RCTConvert.h"
#import "RCTBridge.h"
#import "RCTUIManager.h"
@implementation ViewSnapshotter
RCT_EXPORT_MODULE()
@synthesize bridge = _bridge;
getDashboardCommentList = (comments) => {
return comments.reduce((previousValue, currentValue) => {
let commentDate = moment(currentValue.node.createdAt).startOf('day');
if (previousValue.indexOf(commentDate.toDate().valueOf()) === -1) {
previousValue.push(commentDate.toDate().valueOf());
}
return previousValue;
}, [])
.map((date) => {
NSObject *convertObjectToPoint (NSObject *annotationObject)
{
NSString *title = @"";
if ([annotationObject valueForKey:@"title"]) {
title = [RCTConvert NSString:[annotationObject valueForKey:@"title"]];
}
NSString *subtitle = @"";
if ([annotationObject valueForKey:@"subtitle"]) {
subtitle = [RCTConvert NSString:[annotationObject valueForKey:@"subtitle"]];
package com.mapbox.reactnativemapboxgl;
import android.graphics.Color;
import android.util.Log;
import android.os.StrictMode;
import android.location.Location;
import com.facebook.react.bridge.Arguments;
@christopherdro
christopherdro / websocket-nodejs-redis-server.js
Created January 27, 2016 04:58 — forked from bricecarpentier/websocket-nodejs-redis-server.js
This is a simple websocket server coded using nodejs and http://einaros.github.io/ws/ connecting to a redis pubsub channel and sending messages to selected clients
var ws = require('ws'),
nconf = require('nconf'),
redis = require('redis');
nconf.argv()
.env();
var server = new ws.Server({port: nconf.get('PORT')});
var sockets = {};