Skip to content

Instantly share code, notes, and snippets.

View vanckruz's full-sized avatar

Jhonny Vasquez vanckruz

View GitHub Profile
@vanckruz
vanckruz / quick-sort.js
Created November 24, 2016 00:33 — forked from marioluan/quick-sort.js
Lista de algoritmos úteis em javascript: quicksort,...
function partition( array, left, right ) {
var pivot = array[Math.floor((left + right)/2)],
i = left,
j = right;
while ( i <= j ) {
while ( array[i] < pivot ) {
i++;
import { Component, OnInit } from '@angular/core';
import { NavController, NavParams, LoadingController } from 'ionic-angular';
import { Storage } from '@ionic/storage';
import * as localforage from "localforage";
import { ProfileServices } from '../../providers/profile.services';
@Component({
template: '<div>test</div>',
providers: [ProfileServices]
})
la vista es esta:
<ion-header>
<ion-navbar>
<ion-title>Profile</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<ion-card>
<div class="image_center">
<img [src]="userProfile.picUser">
@vanckruz
vanckruz / profile.ts
Created November 7, 2016 16:52
I can not understand why it does not assign the value to the variable this.userProfile ...can you help me?
import { Component, OnInit } from '@angular/core';
import { NavController, NavParams, LoadingController } from 'ionic-angular';
import { Storage } from '@ionic/storage';
import * as localforage from "localforage";
import { ProfileServices } from '../../providers/profile.services';
@Component({
selector: 'page-profile',
templateUrl: 'profile.html',
const NodeCache = require('node-cache');
const cache = new NodeCache();
let data = { results: [] };
// using the cache module to add an object to the cache
cache.set('my-pokemon', data, function(err, success) {
// success will be true if successful
});
@vanckruz
vanckruz / Operaciones-Git
Created October 13, 2015 18:47 — forked from jelcaf/Operaciones-Git
Git Tips - Mini-trucos de Git para facilitarme la tarea
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas