Skip to content

Instantly share code, notes, and snippets.

View chrisfinazzo's full-sized avatar

Chris Finazzo chrisfinazzo

View GitHub Profile
@chockenberry
chockenberry / df.sh
Created March 4, 2024 18:51
df Replacement
#!/bin/sh
if [ ! -z "$*" ]; then
echo "this is ~/bin/df, use /bin/df"
exit 1
fi
protect=`mount | grep -v "read-only" | grep "protect" | cut -f 3 -w`
nosuid=`mount | grep -v "read-only" | grep "nosuid" | cut -f 3 -w`
@gruber
gruber / Split Tabs to New Window.scpt
Last active April 16, 2024 20:52
An AppleScript for Safari to move all tabs in the frontmost window, from the current tab to the rightmost (last) tab, to a new window.
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
(*
Original script: John Gruber (https://daringfireball.net/linked/2023/12/05/an-applescript-for-safari-split-tabs-to-new-window)
Much more elegant version: Leon Cowle (https://github.com/leoncowle)
Even more elegant version: https://stackoverflow.com/questions/54066100/applescript-to-split-safari-tabs-into-new-window/54089865#54089865
Worth a warning: "moving" tabs with this script doesn't actually move them like
drag-and-drop does. The tabs "moved" by this script will reload in the new window,
@chrisfinazzo
chrisfinazzo / plain-text-template.txt
Created December 2, 2023 02:47 — forked from rodriguezcommaj/plain-text-template.txt
An example plain text email template.
Hello friends!
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ut leo faucibus, pharetra velit vel, porta tortor. In ac est odio. Sed dolor erat, bibendum vel cursus et, mollis vitae eros. Fusce volutpat, quam vel rutrum tristique, mi lectus tincidunt massa, at sodales arcu nibh in erat. Sed accumsan mi at ipsum feugiat laoreet. Fusce blandit nulla at imperdiet condimentum. Etiam eget aliquet leo. Mauris interdum ligula facilisis arcu hendrerit rutrum.
- Bullet list item
- Bullet list item
- Bullet list item
_,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,_
@chrisfinazzo
chrisfinazzo / .aspell.en.pws
Last active November 14, 2023 22:58
My personal Aspell dictionary
personal_ws-1.1 en 246
AIG
ALLIANT
AMS
APA
APIs
AVP
AWK
Abbasi
Adecco
@chockenberry
chockenberry / simkill.sh
Last active December 9, 2023 14:04
A simple shell script to reset CoreSimulator
#!/bin/sh
pids=`ps axo pid,command | grep CoreSimulator | grep -v "grep CoreSimulator" | cut -c 1-5`
if [ "$1" = "go" ]; then
kill -9 $pids
elif [ "$1" = "echo" ]; then
echo $pids
else
pid_param=`echo $pids | tr -s ' ' ','`
@justin
justin / sim.zsh
Last active January 18, 2023 20:21
Convenience wrapper around the simctl command to perform operations related to iOS simulators.
#!/usr/bin/env zsh
#
# Convenience wrapper around the simctl command to perform operations related to iOS simulators.
# Author: Justin Williams (@justin)
#
# Usage: sim <options> <subcommand>
#
# This script is designed to work with ZSH. ymmv with other shells.
set -e
@chrisfinazzo
chrisfinazzo / quit-adobe.sh
Last active November 16, 2023 14:49 — forked from marcoarment/quit-adobe.sh
Uninstalling Adobe stuff...faster.
#!/bin/bash
shopt -s nullglob
LOCALUSER=Chris # Change this for you, obviously
DISABLED_FILES_DIR=/Users/$LOCALUSER/.quit-adobe
# Kill unnecessary macOS system services that run Intel binaries on Apple-silicon systems
sudo killall -q -9 VisualizerService_x86
sudo killall -q -9 CarbonComponentScannerXPC
#!/bin/sh
add::fds()
{
COMMAND="fds,$1:$COMMAND"
}
run::fds()
{
procstat --libxo=xml -w 5 -f "$1" &
@huytd
huytd / wordle.md
Last active May 2, 2024 12:13
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode: