Skip to content

Instantly share code, notes, and snippets.

PeterFaiman / TrashFiles.applescript
Last active September 9, 2021 19:10
trash: ZSH function and AppleScript to send files and folders to the MacOS Trash
on run args
set theFiles to {}
-- POSIX file throws an error inside tell Finder, so build a list
-- before entering tell Finder.
repeat with thePath in args
set the end of theFiles to POSIX file thePath
end repeat
tell application "Finder"

Keybase proof

I hereby claim:

  • I am peterfaiman on github.
  • I am peterfaiman ( on keybase.
  • I have a public key ASArpzvDkxTow_Wb8lzj9HIDCeTt4rY08dnxP2pQP1MtIQo

To claim this, I am signing this object:

PeterFaiman /
Last active July 21, 2017 19:08
Emulate the sysctl -p flag from Linux on OpenBSD.
# Emulate the sysctl -p flag from Linux. To use it as the default sysctl
# command, name it sysctl and place it in your path before /sbin.
# The functions stripcom, update_limit, and sysctl_conf are copied from /etc/rc
# from an OpenBSD 6.1-current snapshot. Replace them with the definitions from
# your own /etc/rc to be sure you get the correct behavior. You MUST then
# modify sysctl_conf in two ways:
Learn a new programming language!
- functional language like Racket, Erlang, Clojure
- Python is so useful and easy to learn!
Install Linux.
- easy: Ubuntu, Linux Mint, ElementaryOS <- super pretty
- harder: Debian expert install, Arch Linux
- stupid: Fedora, CentOS <- bad, out of date, tedious to work with
- expert: FreeBSD / OpenBSD / NetBSD / DragonflyBSD

Git Config

You can set an option for a single repo with:

git config <option> <value>

You can set an option globally (in your ~/.gitconfig file) with: