Skip to content

Instantly share code, notes, and snippets.

View devmaufh's full-sized avatar
💻
Learning

Mauricio Flores Hernández devmaufh

💻
Learning
  • Backbone systems
  • Celaya, Guanajuato, México
View GitHub Profile
@devmaufh
devmaufh / EasyBrokerClient.php
Last active May 17, 2023 17:46
Easy broker api example
<?php
namespace App;
use Exception;
use Illuminate\Http\Client\PendingRequest;
use Illuminate\Support\Facades\Http;
final class EasyBrokerClient
{
@devmaufh
devmaufh / ITRDegreeDays.java
Last active April 9, 2019 03:04
ITRDegreeDays is an open source library for calculating grade days using the simple sinus method. This trigonometric method adjust some sinus funtions to daily lowest and highest temperatures.
/*
* The MIT License
*
* Copyright 2019 Mauricio Flores Hernandez.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@devmaufh
devmaufh / package.json
Created August 12, 2018 17:34
Only copy the lines that has comments and add to your package.json from your application.
{
"name": "NodejsStarterApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node app.js"
},
"dependencies": {
"express": "4.15.x",
"cfenv": "1.0.x",
@devmaufh
devmaufh / app.js
Created August 12, 2018 17:30
This code call Watson assistant and send the response to facebook
//Sorry for my lousy English
var bodyParser=require('body-parser');
var request=require('request');
var express = require('express');var watson = require('watson-developer-cloud');
var assistant = new watson.AssistantV1({
username: 'Paste Assistan api username here',
password: 'paste Assistan api password here',
version: '2018-07-10'
});