Skip to content

Instantly share code, notes, and snippets.

View garkbit's full-sized avatar

Aaron Nelson garkbit

  • Control4
  • Nampa, ID
View GitHub Profile
@garkbit
garkbit / kittens.js
Last active September 27, 2017 19:50
Kittens!
((w) => {
w.resources = window.game.resPool.resources;
w.update = () => {
w.resources.forEach(resource => {
resource.value = resource.maxValue;
});
}
w.timeout = 1000;
w.start = () => {
w.interval = w.setInterval(w.update, w.timeout);
@garkbit
garkbit / force.js
Last active January 25, 2017 20:55
Force Habitica quest to start
(function(){
let userid = window.amplitude.options.userId;
let groupid = window.amplitude.options.userProperties.partyID;
let token = JSON.parse(window.localStorage.getItem('habit-mobile-settings')).auth.apiToken;
let url = "/api/v3/groups/" + groupid + "/quests/force-start";
let http = new XMLHttpRequest();
http.open('POST', url, true);