Skip to content

Instantly share code, notes, and snippets.

View nclslbrn's full-sized avatar

Nicolas Lebrun nclslbrn

View GitHub Profile
@nclslbrn
nclslbrn / editart.xyz.js
Last active October 19, 2025 08:09
Get fxhash edition ipfs thumbnail link and project name
let output = ``
Array.from(document.querySelectorAll("a[href*='/token-detail/']")).map((link) => {
const parent = link.parentNode
const tokenTitle = parent.querySelector('div > span')
const picture = parent.querySelector('div img[alt="token"]')
output += `
<a href="${link.href}" target="_blank">
<img src="${picture.src}" loading="lazy" alt="${tokenTitle.innerText}">
</a>`
})
@nclslbrn
nclslbrn / flat-array.js
Last active January 26, 2024 09:25
Khroma palettes - scrapped from dev tools
// Scrap Khroma palette
// https://www.khroma.co/generator
const componentToHex = (c) => {
var hex = c.toString(16);
return hex.length == 1 ? "0" + hex : hex;
}
const rgbToHex = (r, g, b) => "#" + componentToHex(r)+componentToHex(g)+componentToHex(b);
const palettes = []
@nclslbrn
nclslbrn / index.js
Created September 16, 2022 17:18
NodeJS script to sort collectors by editions (from multiple tokens) collectors.csv from https://fxcollectors.stroep.nl/
const fs = require('fs')
function getCollectors(number) {
const data = fs.readFileSync('./collectors.csv', 'utf8')
let lines = data.split('\n').slice(1)
const collectorsObject = {}
lines.forEach((l) => {
if(l.length === 0) return
const row = l.split(' ')
#!/bin/bash
sleep
export DISPLAY=:0.0
firefox -url http://chat.expo &
sleep 5
xdotool search --name ".*Mozilla Firefox" key F11
xdottol mousemove 0 1080