Updated 2021-02-25
- Ensure connected to same wifi network as computer
// loops through the credit card transactions | |
// proceeds to generate a map of items and the number of times it was on the statement, and total amount spent | |
function calculate () { | |
const places = new Map(); | |
for (const i of document.querySelectorAll('td.ccTransDescription').entries()) { | |
var place = i[1].textContent.trim().toLowerCase(); | |
var entries = i[1].parentNode.querySelectorAll('td.ccTransAmount') | |
var amount = Array.from(entries.entries())[0][1].textContent; | |
if (!places.has(place)) { |
# commit this file to .github/workflows/main.yml | |
# replace {{YOUR_S3_BUCKET}} with your S3 bucket and secrets.* are to be set in your GitHub repo | |
# default I believe is us-east-1 | |
name: Upload Website | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: |
#!/bin/sh | |
ECHO='echo ' | |
for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$'); do | |
if [[ "$(git log $branch --since "6 months ago" | wc -l)" -eq 0 ]]; then | |
if [[ "$DRY_RUN" = "false" ]]; then | |
ECHO="" | |
fi | |
local_branch_name=$(echo "$branch" | sed 's/remotes\/origin\///') | |
$ECHO git branch -d $local_branch_name |
# Writing new aliases | |
# https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases | |
# Checkouts master before a certain date | |
# Useful for when you want to check out a certain time and don't have a specific commit | |
# git checkout-before "2021-01-01 00:00:00" | |
git config alias.checkout-before '!f() { git checkout `git rev-list -n 1 --first-parent --before="$1" master`; }; f' |
#!/usr/bin/env bash | |
# Proceeds to go through remote branches and delete any branch that is over a year old and does not have a commit ahead of master | |
# Proceeds to output what it will delete | |
# ./cleanup.sh ../project-directory | |
# Proceeds to output and delete | |
# ./cleanup.sh ../project-directory --real-run |
import type { NextApiRequest, NextApiResponse } from 'next' | |
import axios from "axios"; | |
// todo this was all taken from the working and converted for use with NextJS - https://glitch.com/edit/#!/fortune-aeolian-amphibian?path=app.js%3A18%3A6 | |
if (!process.env.WHATSAPP_TOKEN || !process.env.WHATSAPP_VERIFY_TOKEN) { | |
throw new Error('env vars not set') | |
} | |
// Access token for your app |
# Fix commits that aren't signed | |
git rebase --exec 'git commit --amend --no-edit -n -S' -i main |
#!/bin/bash | |
# Squashes all the commits and updates the author/date of the initial commit to the current time | |
git reset --soft $(git rev-list --max-parents=0 HEAD) | |
git add -A | |
git commit --amend --reset-author -m "Initial commit" |