Skip to content

Instantly share code, notes, and snippets.

View rfoel's full-sized avatar

Rafael Franco rfoel

View GitHub Profile

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],{fromLanguage,learningLanguage,xpGains}=await fetch(`https://www.duolingo.com/2017-06-30/users/${id}?fields=fromLanguage,learningLanguage,xpGains`,{credentials:"include",headers:{"Content-Type":"application/json"}}).then(e=>e.json()),session=await fetch("https://www.duolingo.com/2017-06-30/sessions",{body:JSON.stringify({challengeTypes:["assist","characterIntro","characterMatch","characterPuzzle","characterSelect","characterTrace","completeReverseTranslation","definition","dialogue","form","freeResponse","gapFill","judge","listen","listenComplete","listenMatch","match","name","listenComprehension","listenIsolation","listenTap","partialListen","partialReverseTranslate","readComprehension","select","selectPronunciation","selectTranscription","syllableTap","syllableListenTap","speak","tap
@rfoel
rfoel / Deploy on Heroku using single repository.md
Last active December 22, 2017 01:06
Deploy on Heroku using single repository

create app on heroku

heroku create name-api --remote name-api
heroku create name-web --remote name-web

heroku ps:scale web=1 --remote name-api
heroku ps:scale web=1 --remote name-web

first push with refs

@rfoel
rfoel / check_list.rb
Last active December 18, 2017 18:21
Check a list of registrations ID or a single one
require 'net/http'
require 'uri'
require 'json'
json_file = File.open('rids.json', 'r:bom|utf-8')
read_json = json_file.read
hashed_json = JSON.parse(read_json)
output = File.open('output','w')
hashed_json.each_with_index do |rid, index|