Skip to content

Instantly share code, notes, and snippets.

View navio's full-sized avatar
🎯
Focusing

Alberto Navarro navio

🎯
Focusing
View GitHub Profile
@navio
navio / isIOS
Created August 20, 2014 15:45
Verify if iOS is being used. By Agent
function isIOS(){
return navigator.userAgent.match(/(iPod|iPhone|iPad)/i);
}
@navio
navio / operations.js
Last active August 29, 2015 14:05
Simplified Node fs Operations.
mkdirp = require('mkdirp');
fs = require('fs');
fes = require('extfs');
module.exports = function(){
return { folder:folderOperations, file:fileOperations };
}
var folderOperations = {
@navio
navio / EbookReader.js
Created January 30, 2015 20:05
EBook Reader
/*
* E-Reader
*
* 0. Define the Ebook
*
* 1. Lets create a feature: the appendix feature
*
* An appendix is: a list of all the words in the book
* in alphabetical order, along wth the page # on which each
* word appears. e.g.:
@navio
navio / fibonacci
Created February 23, 2015 03:10
Linear Fibonacci, Javascript
function runner(){
var a = 0;
var b = 1;
return function fibonacci(){
var c = a + b;
a = b; b = c;
@navio
navio / modal.html
Last active August 29, 2015 14:16
Modal Singleton Example
<html>
<head>
<title>Information</title>
</head>
<body>
<p>Open Modal</p>
</body>
<style media="screen">
.ui-modal{
display:block;
@navio
navio / debounce.js
Last active August 29, 2015 14:20
Debounce Example
(function(){
var debounce = function(fn,time){
var status = true;
var timer = setTimeout(updateTimer(),time);
function updateTimer(){
status = true;
}
@navio
navio / main.js
Created May 10, 2016 02:45
Electron Tray Icon
'use strict';
const electron = require('electron');
const app = electron.app; // Module to control application life.
const BrowserWindow = electron.BrowserWindow; // Module to create native browser window.
const Menu = electron.Menu;
const Tray = electron.Tray;
const Positioner = require('electron-positioner');

Keybase proof

I hereby claim:

  • I am navio on github.
  • I am alnavarro (https://keybase.io/alnavarro) on keybase.
  • I have a public key whose fingerprint is B0E6 E1CD 2766 65FC E73A 8B88 814B D436 C61A 2B46

To claim this, I am signing this object:

{
"posts": [
{ "id": 1, "title": "json-server", "author": "typicode" }
],
"comments": [
{ "id": 1, "body": "some comment", "postId": 1 }
],
"profile": { "name": "typicode" }
}
@navio
navio / lazyload.js
Created August 9, 2016 02:44
LazyLoad basic Replace.
(function(){
var initImages =
function(node,selector){
var images = node.querySelector(selector);
[].foreach.call(images,function(el){
el.src = el.attr('data-lazyload');
el.classList.remove(selector);
});