Skip to content

Instantly share code, notes, and snippets.

View rfoel's full-sized avatar

Rafael Franco rfoel

View GitHub Profile
@rfoel
rfoel / duolingo-xp-farm.md
Last active December 5, 2025 14:08
Duolingo XP farm

Script to farm XP from Duolingo. Never get demoted again!

Copy and paste the following code in your browser console and hit Enter:

const id=document.cookie.split(';').find(e=>e.includes('logged_out_uuid')).split('=')[1];const{fromLanguage,learningLanguage}=await fetch(`https://www.duolingo.com/2017-06-30/users/${id}?fields=fromLanguage,learningLanguage`,{credentials:'include',headers:{'Content-Type':'application/json'}}).then(r=>r.json());while(true){const session=await fetch('https://www.duolingo.com/2017-06-30/sessions',{body:JSON.stringify({challengeTypes:[],fromLanguage,isFinalLevel:false,isV2:true,juicy:true,learningLanguage,smartTipsVersion:2,type:'GLOBAL_PRACTICE'}),credentials:'include',headers:{'Content-Type':'application/json'},method:'POST'}).then(r=>r.json());await fetch(`https://www.duolingo.com/2017-06-30/sessions/${session.id}`,{body:JSON.stringify({...session,heartsLeft:0,startTime:(+new Date()-60000)/1000,enableBonusPoints:false,endTime:+new Date()/1000,failed:false,maxInLessonStreak:
@psterckx
psterckx / tictactoe.md
Last active July 29, 2023 13:08
Online Multiplayer Tic Tac Toe

Online Multiplayer Tic Tac Toe 🎮

Frontend Repo - https://github.com/psterckx/tictactoe-frontend
Backend Repo - https://github.com/psterckx/tictactoe-backend

How to play

Open this link https://tictactoe.psterckx.be in two separate tabs (you can also open the link on two different devices or ask a friend to play with you).

Click Start game in both tabs. Both clients will establish connections to the backend and request a game. Then the clients will be matched with each other and a game will start.