Skip to content

Instantly share code, notes, and snippets.

View jmercedes's full-sized avatar

Juan jmercedes

View GitHub Profile
import React, { Component } from 'react'
class PatientProfile extends Component {
state = {
paciente: {}
}
import React, { Component } from 'react'
import PatientListItem from './PatientListItem'
import PatientProfile from './PatientProfile'
import { Link, Route, Switch } from 'react-router-dom'
export default class PatientList extends Component {
state = {
pacientes: []
import React from 'react'
import * as BooksAPI from './BooksAPI'
import './App.css'
import BookShelf from './BookShelf'
class BooksApp extends React.Component {
state = {
books: [],
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
const value1 = Math.floor(Math.random() * 100);
const value2 = Math.floor(Math.random() * 100);
const value3 = Math.floor(Math.random() * 100);
const proposedAnswer = Math.floor(Math.random() * 3) + value1 + value2 + value3;
let numQuestions = 0;
let numCorrect = 0;
import _ from 'lodash';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
import VideoList from './components/video_list';
import VideoDetail from './components/video_detail';
const API_KEY = 'AIzaSyD2FMgxtPtxdPh04VEEokZ3PMel76xjJ4g';
class AppProxyController < ApplicationController
def by_product
#render layout: false, content_type: 'application/json'
@product = Course.find_by(product_id: params[:product_id])
respond_to do |format|
format.json #{ render json: @product }
end
end
<%= form_for(@user, :url => { :action => "update_password", :controller =>"users", method: "patch" }) do |f| %>
<div class="field">
<%= f.label :password, "Password" %><br />
<%= f.password_field :password, :autocomplete => "off" %>
</div>
<div class="field">
<%= f.label :password_confirmation %><br />
<%= f.password_field :password_confirmation %>
</div>
<div class="action_container">
//jQuery to animate form
$(function() {
$('#inputpassword').hide();
$('#setpassword').hide();
$('#securityquestions').hide();
var x = $('#loginbox').offset();
$('a.btn').on('click', function() {
$('#loginbox').addClass('animated fadeOutRight');
<!-- Input user register form 1 -->
<div id="inputuser" class="col-sm-6 header-content-feature">
<div id="register-form">
<h3 class="log-title">Accede a tus resultados<br><span class="text-primary">de laboratorio</span></h3>
<hr>
<h3 class="log-text">Digita tu nombre de usuario</h3>
<div class="form-group">
<input type="text" class="form-control" id="email" placeholder="...">
<div class="help-block with-errors"></div>
[2017-02-28 09:59:47] INFO WEBrick::HTTPServer#start: pid=4831 port=3000
Started GET "/" for ::1 at 2017-02-28 09:59:53 -0400
PG::ConnectionBad - could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting