Skip to content

Instantly share code, notes, and snippets.

@weiw11
weiw11 / adp_statement_api.py
Last active July 16, 2023 04:12
Export ADP Pay Statements data by accessing their API and saving data as CSV. Requires getting Proxy-Authorization, Cookie, and Statement identifier data manually.
import csv
import requests
# Saves the Dates, Gross and Net Pay, and all Deductions.
def call_adp_statement_api(stmt, headers):
row_data = {}
url = f"https://my.adp.com/myadp_prefix/v1_0/O/A/payStatement/{stmt}"
response = requests.get(url, headers=headers)
@weiw11
weiw11 / resume.json
Last active February 14, 2023 01:16
JSON Resume
{
"meta": {
"version": "v1.0.0",
"canonical": "https://github.com/jsonresume/resume-schema/blob/v1.0.0/schema.json",
"theme": "jacrys"
},
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Wei Wang",
"label": "Software Engineer",
@weiw11
weiw11 / replaceInText.js
Created November 13, 2022 18:48
Javascript text replacement
function replaceInText(element, pattern, replacement) {
for (let node of element.childNodes) {
switch (node.nodeType) {
case Node.ELEMENT_NODE:
replaceInText(node, pattern, replacement);
break;
case Node.TEXT_NODE:
node.textContent = node.textContent.replace(pattern, replacement);
break;
case Node.DOCUMENT_NODE:
@weiw11
weiw11 / RobinhoodPositions.py
Last active September 8, 2022 04:58
Export Robinhood Positions
# Prints your robinhood positions in (Symbol, Quantity, Avg_Price) format
# Example:
# AAPL, 100.00000000, 12.1234
# TTTT, ###.########, ##.####
import requests
robinhoodPositionsAPI = "https://api.robinhood.com/positions/?nonzero=true"
# Enter your authorization token here
@weiw11
weiw11 / FreeCampSites.py
Created October 15, 2021 19:00
Get location data of all states from freecampsites.net
import requests
import json
states = ["Alaska",
"Alabama",
"Arkansas",
"American Samoa",
"Arizona",
"California",
"Colorado",
@weiw11
weiw11 / principal-401k-account-history-export-as-csv.js
Created August 26, 2021 15:56
Exports principal.com's 401k account history as a .csv file as they only export a .qfx file
// ==UserScript==
// @name Principal 401k Account History to CSV
// @version 0.01
// @description A userscript to export Principal's account history to a .csv file
// @author Wei Wang
// @match https://secure05.principal.com/RetirementServiceCenter/memberview?Contract=*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @run-at document-end
// @grant none
// ==/UserScript==
@weiw11
weiw11 / DisableVSCodeShiftContextMenu.reg
Last active December 20, 2020 05:57
VSCode add open with folder to shift context menu on folders only
Windows Registry Editor Version 5.00
; Removes everything added
[-HKEY_CLASSES_ROOT\Directory\shell\vscode]
[-HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\vscode]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]