Skip to content

Instantly share code, notes, and snippets.

View nkpz's full-sized avatar

Nick Perez nkpz

  • Woodside, Queens, NY
View GitHub Profile
@nkpz
nkpz / gist:4686276f4a774747f7b7a01b0496e47d
Created February 13, 2024 18:46
Huggingface To wget Bookmarket
// The following can be added to your bookmark bar. Go to any file listing for a Huggingface model,
// click this bookmarklet, and your clipboard will contain a wget command to download everything.
// This way, you don't have to manually put the command together or use git.
// The problem with using git is that it will create a .git folder containing model files, doubling the disk usage
javascript:navigator.clipboard.writeText('wget ' + [...document.querySelectorAll('a[download]')].map((a) => 'https://huggingface.co' + a.getAttribute('href').slice(0,-14)).join(' '))
@nkpz
nkpz / actually-minimal-html-boilerplate.html
Last active April 12, 2017 03:10
Actually minimal HTML boilerplate, no legacy IE shivving crap
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Title</title>
<meta name="description" content="Website">
<meta name="author" content="Author">
<!-- <link rel="stylesheet" href="css/styles.css"> -->
</head>
javascript:console.log(function(){var a=document.createElement("iframe");a.style.display="none";document.body.appendChild(a);var c=a.contentWindow;document.body.removeChild(a);var a=Object.create(null),b;for(b in window)b in c||(a[b]=window[b]);return a}())
@nkpz
nkpz / gist:7680147b1ea057fa5b10
Created April 20, 2015 04:46
List all app-defined globals (bookmarklet)
//Credit: http://stackoverflow.com/users/2482570/mheiber @ http://stackoverflow.com/questions/2934787/view-list-of-all-javascript-variables-in-google-chrome-console
javascript:(function(){var standardGlobals=["top","window","location","external","chrome","document","inlineCSS","target","width","height","canvas","data","DOMURL","img","svg","ctx","url","w","a","speechSynthesis","webkitNotifications","localStorage","sessionStorage","applicationCache","webkitStorageInfo","indexedDB","webkitIndexedDB","crypto","CSS","performance","console","devicePixelRatio","styleMedia","parent","opener","frames","self","defaultstatus","defaultStatus","status","name","length","closed","pageYOffset","pageXOffset","scrollY","scrollX","screenTop","screenLeft","screenY","screenX","innerWidth","innerHeight","outerWidth","outerHeight","offscreenBuffering","frameElement","clientInformation","navigator","toolbar","statusbar","scrollbars","personalbar","menubar","locationbar","history","screen","postMessage","close","blur","focus","ondev