Skip to content

Instantly share code, notes, and snippets.

View plasmadice's full-sized avatar

Herman plasmadice

View GitHub Profile
@plasmadice
plasmadice / reinstall-betterdiscord.sh
Last active June 18, 2024 21:46 — forked from iGlitch/bd.sh
BetterDiscord Automatic Manual Installer - Mac OS
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Reinstall BetterDiscord
# @raycast.mode compact
# Optional parameters:
# @raycast.icon 🤖
@plasmadice
plasmadice / getRecentCommitCount.ts
Last active June 11, 2023 04:11
getRecentCommitCount - Get a user's GitHub commit count within a timeframe using fetch()
export async function getRecentCommitCount(username: string, email: string, days: number = 30) {
let totalCommits = 0
let page = 1
const perPage = 100
const timeFrame = new Date()
timeFrame.setDate(timeFrame.getDate() - days)
let stop = false
// Loop through pages until we find a commit outside of our timeframe
while (!stop) {