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
Desktop app supports the ability to switch profiles but the iOS app does not. | |
To be able to use multiple Discord profiles on an iOS device without logging out one can: | |
1. Use the Discord app for a main profile | |
2. Use the Chrome browser and go to https://discord.com/login. You have to go there and not just go to discord.com because on a mobile browser it doesn't have a login link and instead wants you to download the app. | |
3. Log into Discord through your browser that way | |
4. If you need more profiles - you will need to use a different browser |
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
#!/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" |
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
# Fix commits that aren't signed | |
git rebase --exec 'git commit --amend --no-edit -n -S' -i main |
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
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 |
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
#!/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 |
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
# 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' |
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
#!/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 |
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
# 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: |
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
// 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)) { |
NewerOlder