Skip to content

Instantly share code, notes, and snippets.

View rushi's full-sized avatar

Rushi Vishavadia rushi

View GitHub Profile
@rushi
rushi / generator.js
Last active June 13, 2024 08:12
Generate Lodash docs into a JSON file
// Taken from https://github.com/jdalton/docdown/blob/master/lib/generator.js
// See: https://github.com/raycast/extensions/pull/12848#issuecomment-2164948004
'use strict';
const fs = require("fs");
const chalk = require("chalk")
const write = (line) => {
return process.stdout.write(line)
}
#!/usr/bin/env bash
# Do a git remote prune <remote_name>`. This will delete all stale remote-tracking branches under <remote_name>. These
# stale branches have already been removed from the remote repository referenced by <remote_name>, but are still locally
# available in remotes/<remote_name>
git remote | xargs -n 1 -t git remote prune
# Delete branches
# git branch -vv | grep ': gone]'| grep -v "\*" | awk '{ print $1; }' | xargs -r git branch -d
@rushi
rushi / bash_prompt.sh
Last active April 4, 2022 09:58
Rushi's bash prompt for servers
# Rushi's bash prompt and profile setup script
# - Dervied from Ben Alman's bash prompt github.com/cowboy/dotfiles (LICENSE found there)
# - extended to add to remote servers, with common aliases
# Prompt Example:
# [user@hostname:~/.dotfiles]
# [11:14:45] $
if [[ ! "${prompt_colors[@]}" ]]; then
prompt_colors=(
@rushi
rushi / xola-checkout.md
Last active May 2, 2020 11:44
Opening the Xola checkout window