Skip to content

Instantly share code, notes, and snippets.

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

Igor Vieira igorvieira

🏠
Working from home
View GitHub Profile
@igorvieira
igorvieira / convert.js
Last active September 25, 2017 12:49
Convert files html.slim for html.erb
const { exec } = require('child_process')
const fs = require('fs')
const rl = require('readline')
const i = rl.createInterface(
process.stdin,
process.stdout,
null
);
$(document).ready(function(){var b=700;$(window).scroll(function(){$(this).scrollTop()>220?$(".topo").fadeIn(b):$(".topo").fadeOut(b)}),$(".topo").click(function(a){return a.preventDefault(),jQuery("html, body").animate({scrollTop:0},b),!1})});
@igorvieira
igorvieira / upbutton.js
Created April 29, 2017 11:54
up-button
$(document).ready(function(){
var offset = 220;
var duration = 700;
$(window).scroll(function() {
if ($(this).scrollTop() > offset) {
$('.topo').fadeIn(duration);
} else {
$('.topo').fadeOut(duration);
}
});
@igorvieira
igorvieira / topkeywords.js
Created October 5, 2016 15:52 — forked from elliotbonneville/topkeywords.js
Find top keywords associated with a Google search with this Node.js application.
var request = require("request"),
cheerio = require("cheerio"),
url = "https://www.google.com/search?q=data+mining",
corpus = {},
totalResults = 0,
resultsDownloaded = 0;
function callback () {
resultsDownloaded++;
@igorvieira
igorvieira / introrx.md
Created November 22, 2015 00:17 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing