Use https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en to install these 2 scripts.
Right click a target square to queue your currently selected unit along the shortest path to the target.
| // ==UserScript== | |
| // @name Require Lodash | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description Asynchronously inject lodash into all webpages | |
| // @author Steven Hao | |
| // @match *://*/* | |
| // @grant none | |
| // ==/UserScript== |
| componentDidUpdate(prevProps, prevState) { | |
| const diff = (o1, o2) => ( | |
| _.map(_.filter(_.uniq([..._.keys(o1), ..._.keys(o2)]), key => o1[key] !== o2[key]), key => ({ | |
| key, | |
| v1: o1[key], | |
| v2: o2[key], | |
| })) | |
| ); | |
| console.log('DIFF', { props: diff(prevProps, this.props), state: diff(prevState, this.state) }); | |
| } |
| // ==UserScript== | |
| // @name PrestoDB Linter v0.1.3 | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description try to take over the world! | |
| // @author Steven Hao | |
| // @match https://modeanalytics.com/editor/* | |
| // @grant none | |
| // ==/UserScript== |
| // ==UserScript== | |
| // @name Presto Parser | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description try to take over the world! | |
| // @author You | |
| // @match https://modeanalytics.com/editor/* | |
| // @grant none | |
| // ==/UserScript== | |
| (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ |
| // ==UserScript== | |
| // @name Ace Editor Exposer | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description try to take over the world! | |
| // @author You | |
| // @match https://modeanalytics.com/* | |
| // @grant none | |
| // ==/UserScript== |
| // ==UserScript== | |
| // @name PrestoDB Linter | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description modeanalytics.com userscript to autolint sql code | |
| // @author Steven Hao | |
| // @match https://modeanalytics.com/editor/* | |
| // @grant none | |
| // ==/UserScript== |
| // get fb sticker urls | |
| // open the sticker view and then run this script | |
| stickers = Array.from(document.querySelectorAll('.uiGrid._51mz._5f0n ._5r8i')) | |
| urls = stickers.map(el => el.style.backgroundImage).map(s => s.substring(5, s.length - 2)) | |
| console.log(JSON.stringify(urls, 2, '\n')) |
| /* | |
| * four wheeler, orange (255, 158, 0) | |
| * two wheeler, red (255, 61, 99) | |
| * pedestrian, blue (0, 0, 230) | |
| * barrier, yellow (218, 232, 30) | |
| * cone/other, purple (153, 0, 153) | |
| */ | |
| const NUSCENES_ORANGE = 'rgb(255, 158, 0)' | |
| const NUSCENES_RED = 'rgb(255, 61, 99)' |
Use https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en to install these 2 scripts.
Right click a target square to queue your currently selected unit along the shortest path to the target.
| class Vector3(): | |
| def __init__(self, x, y, z): | |
| self.x = x | |
| self.y = y | |
| self.z = z | |
| def to_obj(self): | |
| return { | |
| 'x': self.x, | |
| 'y': self.y, |