Skip to content

Instantly share code, notes, and snippets.

@kdar
kdar / adp.download.csv.py
Created November 15, 2021 16:02
ADP paystubs download CSV
import csv
import os
import json
import sys
import traceback
# Paste the following into a browser's dev console when you're
# at the "Pay and Tax statements" screen.
"""
function downloadObjectAsJson(exportObj, exportName){
@kdar
kdar / mint.novalidation.user.js
Last active October 21, 2021 23:51
Disable account name validation in mint
// ==UserScript==
// @name MintDisableValidation
// @namespace kdar
// @version 0.1
// @description Disable account name validation in mint
// @author kdar
// @match https://mint.intuit.com/settings.event*
// @grant none
// @updateURL https://gist.githubusercontent.com/kdar/d66c76ddfe691e5066e2fc8d610ba6f3/raw
// ==/UserScript==
@kdar
kdar / mergeling_calc.js
Created February 3, 2021 13:51
Mergeling algorithm calc
export function positiveNumber(v) {
let c = parseInt(v);
c = Number.isNaN(c) ? null : c;
if (c !== null && c < 0) {
c = 0;
}
return c;
}
@kdar
kdar / vanguard statement-confirmation download.js
Last active November 4, 2023 17:03
This will download Vanguard confirmation/statement pdfs in bulk
// I was informed that this code no longer works as Vanguard changed
// it's UI. I don't have an account to be able to update this. But it's
// here for prosperity.
// // https://personal.vanguard.com/us/Confirms
// // https://personal.vanguard.com/us/Statements
// function contains(selector, text) {
// var elements = document.querySelectorAll(selector);
// return Array.prototype.filter.call(elements, function(element){
@kdar
kdar / fidelity statement download.js
Last active June 2, 2021 11:49
This downloads all the PDFs and CSVs in the statements section of Fidelity investments
var username = "Kevin";
var table = document.querySelectorAll('.statement-data-table')[1];
var rows = Array.from(table.querySelectorAll("tbody tr")).slice(1);
var delay = 0;
rows.forEach(function(row) {
let parts = row.querySelector("th").innerText.split("/");
let date = `${parts[2]}-${parts[0]}-${parts[1]}`;
let tds = row.querySelectorAll("td");
let statement = tds[0].innerText;
let pdfurl = tds[1].querySelector("a").getAttribute("href");
@kdar
kdar / Sallie Mae statement download.js
Created October 7, 2020 15:22
Download Sallie Mae bank statements
function download(url, name) {
fetch(url, {
method: 'GET',
}).then(function (resp) {
return resp.blob();
}).then(function (blob) {
const newBlob = new Blob([blob], { type: "application/pdf", charset: "UTF-8" })
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(newBlob);
/// WordCountError enumerates all possible errors returned by this library.
#[derive(Debug)]
enum WordCountError {
/// Represents an empty source. For example, an empty text file being given
/// as input to `count_words()`.
EmptySource,
/// Represents a failure to read from input.
ReadError { source: std::io::Error },
@kdar
kdar / adp.workforcenow.paystub.download.js
Last active January 3, 2021 14:28
Download ADP Workforcenow paystubs
// 1. Go to https://workforcenow.adp.com and login.
// 2. Go to the pay stub/statements page
// 3. Open developer tools and paste the below code in console
// 4. Run
// You may want to configure firefox to automatically save PDFs.
// Otherwise, you'll get bombarded by save dialogs.
// Go to Preferences -> Applications -> Portable Document Format (PDF). Change to "Save File".
// Only tested in Firefox 77.0.1 (64-bit) on windows.

Keybase proof

I hereby claim:

  • I am kdar on github.
  • I am kdar (https://keybase.io/kdar) on keybase.
  • I have a public key ASDBcRmVGh9N5fV8Gi3N1Vlb6MtgdGG3lTDmAMrFn46iGAo

To claim this, I am signing this object:

@kdar
kdar / gist:3270057613b9ed082396
Created November 9, 2014 18:05
Sublime Text Terminal settings for MSYS2
{
// The command to execute for the terminal, leave blank for the OS default
// On OS X the terminal can be set to iTerm.sh to execute iTerm
"terminal": "D:\\dev\\msys64\\usr\\bin\\mintty.exe",
// A list of default parameters to pass to the terminal, this can be
// overridden by passing the "parameters" key with a list value to the args
// dict when calling the "open_terminal" or "open_terminal_project_folder"
// commands
"parameters": ["/bin/sh", "-lc", "cd \"$(cygpath '%CWD%')\"; exec bash"]