Skip to content

Instantly share code, notes, and snippets.

View ArjunHariharan's full-sized avatar

Arjun Hariharan ArjunHariharan

View GitHub Profile
'use strict';
let request = require('request');
module.exports = function(config) {
if (!config) {
config = {};
}
if (!config.rasa_uri) {
{
"rasa_nlu_data": {
"common_examples": [
{
"text": "hi",
"intent": "greet",
"entities": []
},
{
"text": "my phone isn't turning on.",
controller.hears(['device_failure'], 'direct_message,direct_mention,mention',
function (bot, message) {
let reply = 'Try pressing the power button for 30 seconds. ';
reply += 'Bring the phone to the service center if it does not start. ';
reply += 'Don't forget to carry your warranty card.';
bot.reply(message, reply);
});
let Botkit = require('botkit');
let rasa = require('./Middleware/rasa')({rasa_uri: 'http://localhost:5000'});
let controller = Botkit.slackbot({
clientId: process.env.clientId,
clientSecret: process.env.clientSecret,
scopes: ['bot'],
json_file_store: __dirname + '/.db/'
});
{
"name": "hello-react",
"version": "1.0.0",
"description": "hello react",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Arjun Hariharan",
"license": "ISC",
import React, {Component} from 'react';
import {render} from 'react-dom';
let rootElement = document.getElementById('root');
class App extends Component {
render() {
return (
<h1> Hello World </h1>
)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello-React</title>
</head>
<body>
<!-- React will render the contents in side the root div.-->
<div id="root"></div>
{
"presets" : ["es2015", "react"]
}
@ArjunHariharan
ArjunHariharan / package.json
Created October 30, 2016 16:20
Hello-React package.json
{
"name": "hello-react",
"version": "1.0.0",
"description": "hello react",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Arjun Hariharan",
"license": "ISC"
var webpack = require('webpack');
var path = require('path');
// Build Directory
// Webpack will put the bundled assets in this directory.
var BUILD_DIR = path.resolve(__dirname, 'build');
// App directory
// Our source code lies here.
var APP_DIR = path.resolve(__dirname, 'src');