This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Promise.resolveAll = function petepete(promises) { | |
function reflect(promise) { | |
if (Promise.resolve(promise) !== promise) { | |
return promise; | |
} | |
return promise.then((v) => {return v;}).catch((e) => {return e;}); | |
} | |
return Promise.all(promises.map(reflect)); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To use: Visit https://riders.uber.com/trips, open the Chrome DevTools and | |
// paste this script into the console, then click the > (next page) icon on the | |
// bottom of the page, and once the page has finished loading, run `calcPage()` | |
// again to add that page to your total. Keep going until you've finished all of | |
// the pages. | |
// Note: this script doesn't handle different currencies, everything will be | |
// treated as the same currency. | |
var total = 0.0; | |
var count = 0.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This probably doesn't work anymore. | |
let lines = ""; | |
var orders = $("tbody#OrderHistoryLikedItem tr"); | |
var count = 0; | |
var amount = 0.0; | |
for (var i = 0; i < orders.length; i++) { | |
try { | |
var tr = $(orders[i]); | |
var d = tr.find("td.date strong")[0].innerText.trim(); | |
var v = tr.find("td.vendor a")[0].innerText.trim(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "skipAll": true }, | |
{ | |
"url": "https://a810-bisweb.nyc.gov/bisweb/JobsQueryByLocationServlet?requestid=0&allbin=1090814", | |
"proxy": true, | |
"priority": 2, | |
"description": "DOB Jobs Overview", | |
"terms": [ | |
{ | |
"term": "DISAPPROVED", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make ls in color | |
alias ls="command ls -G" |