I hereby claim:
- I am jkjustjoshing on github.
- I am jkjustjoshing (https://keybase.io/jkjustjoshing) on keybase.
- I have a public key ASAutzKPY2wB2OXvsSYnqsYBqR26-vbUQOYGHMl_tKoDlwo
To claim this, I am signing this object:
| (async () => { | |
| const dateStr = (dateObj) => `${dateObj.getUTCFullYear()}-${String(dateObj.getUTCMonth() + 1).padStart(2, '0')}-${String(dateObj.getUTCDate()).padStart(2, '0')}` | |
| const getData = async (dateObj) => { | |
| const date = dateStr(dateObj) | |
| const username = '' | |
| const resp = await fetch(`https://connect.garmin.com/modern/proxy/wellness-service/wellness/dailySleepData/${username}?date=${date}&nonSleepBufferMinutes=60`, { | |
| "headers": { |
| const calculationMachine = Machine( | |
| { | |
| id: 'calculator', | |
| initial: 'init', | |
| context: { | |
| number1: '', | |
| operand: null, | |
| number2: '', | |
| result: null, |
I hereby claim:
To claim this, I am signing this object:
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
| (function () { | |
| function hashCode (string){ | |
| var hash = 0; | |
| if (string.length == 0) return hash; | |
| for (i = 0; i < string.length; i++) { | |
| char = string.charCodeAt(i); | |
| hash = ((hash<<5)-hash)+char; | |
| hash = hash & hash; // Convert to 32bit integer | |
| } | |
| return hash; |
| (function() { | |
| var jQuery = document.querySelector('iframe').contentWindow.jQuery; | |
| jQuery('.activityName').each(function(){ | |
| var $this = jQuery(this); | |
| $this.css({ | |
| overflow:'auto', | |
| width:'200px' | |
| }); |
| // ==UserScript== | |
| // @name AngularJS Injector | |
| // @namespace http://joshkra.me/ | |
| // @version 0.1 | |
| // @description Binds $inject method to window | |
| // @author jkjustjoshing | |
| // @match *://*/* | |
| // ==/UserScript== | |
| // This userscript creates an $inject() method on the window object that can be used to |
| Promise.any = function(arrayOfPromises) { | |
| // For each promise that resolves or rejects, | |
| // make them all resolve. | |
| // Record which ones did resolve or reject | |
| var resolvingPromises = arrayOfPromises.map(function(promise) { | |
| return promise.then(function(result) { | |
| return { | |
| resolve: true, | |
| result: result | |
| }; |