Skip to content

Instantly share code, notes, and snippets.

View Ifmr24's full-sized avatar
😄

Fabian Mesias Ifmr24

😄
  • Santiago
  • 02:07 (UTC -04:00)
View GitHub Profile
@Ifmr24
Ifmr24 / buscador.js
Last active April 7, 2019 04:06
NextJS React - Componentes Reutilizables
import React, {useState} from 'react'
export default function Buscador(){
const [search, setSearch] = useState(String)
let redir = () => {
window.location.href = `/search?s=${search}`;
}
return(
@joshuacerbito
joshuacerbito / useScroll.js
Last active January 8, 2024 13:44
Custom React hook for listening to scroll events
/**
* useScroll React custom hook
* Usage:
* const { scrollX, scrollY, scrollDirection } = useScroll();
*/
import { useState, useEffect } from "react";
export function useScroll() {
const [lastScrollTop, setLastScrollTop] = useState(0);
@DusterTheFirst
DusterTheFirst / paginator.ts
Last active August 12, 2019 18:35
Discord.js Paginator (MIT licensed)
import { User, TextChannel, Message, ReactionCollector } from "discord.js";
class Paginator {
/**
* Current page
*/
current: number;
/**
* Total pages
*/
@janily
janily / Breakpoints
Created January 16, 2014 11:36
Mobile-first CSS Media Queries Breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }