Skip to content

Instantly share code, notes, and snippets.

View Arecsu's full-sized avatar
🍪
Baking some cookies

Alejandro Romano Arecsu

🍪
Baking some cookies
View GitHub Profile
@Arecsu
Arecsu / figma-slides-mouse-control.ahk
Last active December 19, 2024 15:56
Figma Slides — Improved Mouse Control for Presentations
; -------------------------------------------------
; Figma Slides is beautiful!
; But we can't fully control the presentation
; using a mouse, which is a great tool to present
; while walking around the auditorium.
;
; This hack:
; 1. Adds Right Click support to go to the
; previous slide in Presenter Mode
;
@Arecsu
Arecsu / README.md
Created August 25, 2023 18:03 — forked from jennyknuth/README.md
Transform an SVG into a data URI—best practice

How to transform an SVG into a data URI

by Jenny Knuth, based on the work of Chris Coyier and Taylor Hunt

A data URI is a nice way to include a web resource without needing to make an HTTP request. Chris Coyier explains the technique nicely in Probably Don't Base64 SVG.

While a PNG might use Base64 encoding, for SVG, there is a better way.

Taylor Hunt's experiments led to this solution for optimizing SVGs in data URIs:

"So the best way of encoding SVG in a data URI is data:image/svg+xml,[actual data]. We don’t need the ;charset=utf-8 parameter (or the invalid ;utf8 parameter…), because URLs are always ASCII."

@Arecsu
Arecsu / RealViewportDimensions.md
Created June 26, 2022 20:09
Real time REAL viewport height - mobile toolbars included

Javascript code to set a CSS var --real-vh with the real value in px. It updates when the browser gets resized.

function realVH() {
  document.documentElement.style.setProperty('--real-vh', (window.innerHeight) + "px")
}

realVH()
@Arecsu
Arecsu / lasfm-p-dw.py
Last active March 30, 2022 07:22
Last.fm bulk artist photos downloader
# download every image from an artist profile in last.fm!
# full resolution! and multithreading!
# .webp images and .gifs
# want .jpg images instead of .webp? Search for the .replace('jpg' part in the code and delete that line
# jpg in 2022, can you imagine?
#
# usage:
# $ python3 lastfm-p-dw.py https://www.last.fm/es/music/Yung+Lean/+images
#
# SUBMIT A LINK LIKE THAT ONE without any "?page=1". Just clean as the example.