/g,">").replace(/"/g,""").replace(/'/g,"'")}async function d(){try{const t=await fetch(`https://api.lanyard.rest/v1/users/${h}`,{headers:{Accept:"application/json"}});if(!t.ok)throw new Error(`Lanyard gave ${t.status}`);const r=await t.json();if(!r?.success||!r.data)throw new Error("Invalid Lanyard response");const n=r.data,v=n.activities?.find(a=>a.type===4)?.state||n.discord_status||"offline";if(s&&v!==s.textContent&&(s.textContent=v),e)if(n.listening_to_spotify&&n.spotify){const a=n.spotify,x=`${u(a.song)} - ${u(a.artist)}`,I=`${x}`;e.innerHTML!==I&&(e.innerHTML=I)}else{const a="not listening to anything rn :(";e.textContent!==a&&(e.textContent=a)}}catch{s&&s.textContent==="loading..."&&(s.textContent="offline"),e&&e.textContent==="loading..."&&(e.textContent="not listening to anything rn :(")}}async function l(){try{const t=await fetch("https://rest.fanqyxl.net/api/update/status",{headers:{Accept:"application/json"},mode:"cors"});if(!t.ok)throw new Error(`Battery API responded with ${t.status}`);const r=await t.json();if(typeof r?.level!="number")throw new Error("Invalid battery API response - missing level");const n=`${r.level}%`;o&&o.textContent!==n&&(o.textContent=n)}catch{o&&(o.textContent="unavailable")}}function p(){f(),i=setInterval(d,2e3)}function f(){i&&(clearInterval(i),i=null)}function y(){g(),c=setInterval(l,6e4)}function g(){c&&(clearInterval(c),c=null)}function m(){d(),l(),p(),y(),document.addEventListener("visibilitychange",function(){document.hidden?(f(),g()):(d(),l(),p(),y())})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",m):m()})(); about
- Sysadmin - I currently manage a dedicated server from hetzner for myself.
- Fullstack(?) - Kinda comfortable with TypeScript, JavaScript, Astro, TailwindCSS, and Node.js.
- I live in Queens, NYC
- Experienced w/ Proxmox & Networking
socials