Skip to content

Instantly share code, notes, and snippets.

View victorhenrion's full-sized avatar

Victor victorhenrion

  • Station F, Paris
  • 01:06 (UTC +01:00)
View GitHub Profile
javascript:(async()=>{const url=window.location.href.split('?')[0];const name=document.querySelector('h1')?.innerText?.trim()||'';const expSection=document.querySelector('[id*="experience"]')?.closest('section');let company='',position='';if(expSection){const firstExp=expSection.querySelector('li');if(firstExp){const spans=firstExp.querySelectorAll('span[aria-hidden="true"]');if(spans.length>=2){position=spans[0]?.innerText?.trim()||'';company=spans[1]?.innerText?.trim()||'';}}}if(!company){const headline=document.querySelector('.text-body-medium')?.innerText?.trim()||'';const atMatch=headline.match(/(?:at|@|chez)\s+(.+)/i);if(atMatch)company=atMatch[1].trim();}const row=[url,name,company,position].join('\t');try{await navigator.clipboard.writeText(row);}catch(e){prompt('Copy this:',row);}})();
@victorhenrion
victorhenrion / command
Last active November 25, 2023 04:09
Turf.js TypeScript 5 Patch
curl https://gist.githubusercontent.com/vpctorr/5217a668544e88790e545cbe6914d34e/raw/75420dcf22e73b80f027d3dd81dd42315284b044/turf_types_patch.sh | bash