Skip to content

Instantly share code, notes, and snippets.

@Saturate
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Saturate/9911339 to your computer and use it in GitHub Desktop.
Save Saturate/9911339 to your computer and use it in GitHub Desktop.
Unicoin StackOverflow Auto Miner
// How to use it:
// Copy paste to your console (Press F12), and run it (Enter)!
// Now you are rich! Or soon...
var fkey = StackExchange.options.user.fkey || $("input[name=fkey]").val(); // I have no idea what the fkey is
var totalCoinsMined = 0;
console.log('Your fkey is: ' + fkey);
var mineSomeUnicoins = function() {
var responseTime = Math.floor(Math.random()*(12000-10000+1)+10000); // Get a random number
$.get("/unicoin/rock").done(function (e, d) {
console.log('Mine: ' + e.rock + ' in ' + responseTime + 'ms');
setTimeout(function() {
$.post("/unicoin/mine?rock=" + e.rock, {
'fkey': fkey
}).done(function (t) {
totalCoinsMined = t.value + totalCoinsMined;
console.log('mined ' + t.value + ' unicoins (' +totalCoinsMined +' total)');
mineSomeUnicoins(); // Do it again!
});
}, responseTime);
});
};
// Start mining
mineSomeUnicoins();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment