Skip to content

Instantly share code, notes, and snippets.

View brandovidal's full-sized avatar
🥷
Ninja Dev

Brando Vidal brandovidal

🥷
Ninja Dev
View GitHub Profile
@justincy
justincy / README.md
Last active April 5, 2024 22:19
Configure Storybook to work with Next.js, TypeScript, and CSS Modules

In addition to the Storybook for React setup, you'll also need to install these packages:

npm i -D @babel/core babel-loader css-loader style-loader
@colxi
colxi / getBase64Image.js
Created March 9, 2019 22:49
getBase64Image() : Get the Base64 representation of an image from its url
// get an image blob from url using fetch
let getImageBlob = function(url){
return new Promise( async resolve=>{
let resposne = await fetch( url );
let blob = resposne.blob();
resolve( blob );
});
};
// convert a blob to base64
@ricardobrg
ricardobrg / maxlength.html
Created June 6, 2018 03:06
input number maxlength with javascript oninput
<input type="number" step="1" min="1" max="999" maxlength="3" name="number" inputmode="numeric" oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
@Koasing
Koasing / download.py
Created May 16, 2018 09:34
pytube download script
#!/usr/bin/env python3
import argparse
from pytube import YouTube
def download(url):
def progress_callback(stream, chunk, file_handle, bytes_remaining):
# this function is called by download process... do not call directly!
total_size = stream.filesize
downloaded_size = total_size - bytes_remaining
@DavidWells
DavidWells / reset.css
Last active May 4, 2024 20:04 — forked from karbassi/reset.css
CSS reset. Follow me on the twitters for more tips: https://twitter.com/davidwells
/* http://meyerweb.com/eric/tools/css/reset/
v2.0-modified | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@brenes
brenes / README.md
Last active April 9, 2024 23:24
CSV de paises, con nombre en castellano, ingles, codigo ISO y prefijo telefónico del país