Skip to content

Instantly share code, notes, and snippets.

@gentilmente
gentilmente / filter.js
Created October 26, 2016 21:26
jQuery effect and pure.js
$(function() {
$('.material-card > .mc-btn-action').click(function () {
var card = $(this).parent('.material-card');
var icon = $(this).children('i');
icon.addClass('fa-spin-fast');
if (card.hasClass('mc-active')) {
card.removeClass('mc-active');
window.setTimeout(function() {
icon
@gentilmente
gentilmente / catFactsTranslated.js
Created August 9, 2021 01:01
manage two public APIs
//https://apipheny.io/free-api/
const fetch = require("node-fetch");
const text = fetch("https://catfact.ninja/fact")
.then((res) => res.json())
.then((json) => {
const text = json.fact;
console.log(text + "\n");