Skip to content

Instantly share code, notes, and snippets.

View Rynaro's full-sized avatar
⚗️
Doing alchemy!

Henrique A. Lavezzo Rynaro

⚗️
Doing alchemy!
View GitHub Profile
@Rynaro
Rynaro / spotify_web_playlist_scraper.js
Last active September 25, 2024 17:16
Spotify Playlist Track + Artist Scraper
// Script to extract track names and artists from your current playlist page and export them in CSV format.
// This script is intended for personal use to manage playlists efficiently.
// Any misuse of this script is not the responsibility of the author.
(async function() {
// Map to store tracks using `aria-rowindex` as the key
const tracksMap = new Map();
// Adjust these parameters if needed
const scrollDelay = 800; // Delay between scrolls in milliseconds
@Rynaro
Rynaro / plugins.txt
Created July 1, 2024 17:16
My potions plugins list
Rynaro/daily-codex
Rynaro/mini-rails
@Rynaro
Rynaro / component_mailer.rb
Created September 13, 2021 20:09
View component from Rails Mailers
# frozen_string_literal: true
class ComponentMailer < ApplicationMailer
def notify(me)
mail to: '[email protected]', subject: 'Component', body: ApplicationController.render(MyComponent.new(me: me))
end
end
@Rynaro
Rynaro / quicksort.rb
Last active August 29, 2015 13:57
Simple QuickSort in Ruby
def quick ary
(x = ary.pop)? quick( ary.select do |i| i < x end) + [x] + quick( ary.select do |i| i > x end ) : []
end
print quick [23, 56, 87, 1, 5, 67, 345, 76, 5, 8, 7, 234]