Skip to content

Instantly share code, notes, and snippets.

View wharley's full-sized avatar
🏠
Working from home

Wharley wharley

🏠
Working from home
View GitHub Profile
@wharley
wharley / upload.js
Last active October 14, 2016 17:03
exports.upload = function(req, res){
var form = new formidable.IncomingForm();
form.parse(req, function(err, fields, files) {
readFile(files.file.path)
.then(processRows)
.then(processProducts)
.then(function(arrData){
getPokmonApi('http://pokeapi.co/api/v2/')
.then(function(body){
console.log(body)
})
function getPokmonApi(url) {
return new Promise(function(resolve, reject){
<template>
<div id="app" class="container">
<table class="table table-bordered table-striped">
<tr v-for="issue in issues">
<td>{{issue}}</td>
</tr>
</table>
</div>
</template>
qx.Class.define("ekoosweb.receita.ECadastro",
{
extend : qx.ui.window.Window,
construct : function(id, objUsu) {
this.base(arguments);
this.__id = null;
'use strict';
app.controller('HeritageClassCtrl', function($rootScope, $location, $window, $scope, $http, $q)
{
$scope.currentPage = 1;
$scope.numPerPage = 10;
$scope.maxSize = 5;
$scope.fullPage = 4;
$scope.home = () => {
@wharley
wharley / speech.ts
Created February 5, 2017 02:09
Reconhecedor de voz
import { Component, NgZone } from '@angular/core';
import { Platform, ToastController } from 'ionic-angular';
import { NavController } from 'ionic-angular';
//declare var SpeechRecognition: any;
//OnStart - Para ativar a escuta.
//OnEnd - Para parar de ouvir.
//OnError - Para exibir erro no toast.
//OnResult - Para adicionar texto na lista.
import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import { FunctionComponent } from './function.component';
@Injectable()
export class FunctionService {
import { Component } from '@angular/core';
import { FunctionService } from './function.service';
@Component({
selector: 'function',
template: `
<div class="container center-block">
<div class="row col-md-6 col-md-offset-2 custyle">
<table class="table table-striped custab">
import { Component } from '@angular/core';
import { NavController, ViewController } from 'ionic-angular';
import { HomeService } from './home.service';
@Component({
selector: 'page-home',
templateUrl: 'home.html',
providers: [
HomeService
import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import { HomePage } from './home';
@Injectable()
export class HomeService {