You're happly running a desktop X11 session as user anne
; but you want to be able to run an X11 application in that session as bob
, but wehn you try to do this you get:
X-Server access is denied on host
#!env zsh | |
## if `env` is not in your path, change the above to point to | |
## the absolute path of `env` on your system; often `/usr/bin/env` | |
for mkv in *.mkv ; do | |
mp4="${mkv%.mkv}.mp4" | |
echo -n "'$mkv' => '$mp4'" | |
if [[ -f "$mp4" ]]; then | |
echo " [SKIPPED] (MP4 already exists)" | |
continue | |
fi |
#!/usr/bin/env bash | |
set -euo pipefail | |
## encrypted files; script will create this. Put in a synced folder | |
ENCRYPTED_FOLDER="~/Dropbox/encrypted" | |
## mountpoint; script will create this. Should stay empty when not mounted! | |
## DO NOT PUT THIS IN A SYNCED FOLDER - DOING SO WILL SYNC UNENCRYPTED DATA | |
MOUNTPOINT="~/.local/cloudmount/Dropbox-Encrypted" |
# usage: `ip4 HOSTNAME` | |
alias ip4='perl -MSocket -e '\''$pack=gethostbyname($ARGV[0]); print inet_ntoa($pack)'\''' |
NOTE the cron
command scheduler is considered deprecated by Apple,
in favor of using Launch Agents along with launchd
. There is a decent
launchd tutorial at launchd.info if you want to
do that instead.
Cron jobs usually need to work outside of the macOS "sandbox", accessing scripts and files across the filesystem. macOS supports Unix filesystem permissions, but there's an additional safety gate that's evaluated
NB: these instructions are for Ubuntu; they work under WSL on Windows 10 as well
Get the decrypt.sh
file from here: https://github.com/zhangyoufu/unifi-backup-decrypt
Make sure prerequisites are installed:
sudo apt update && sudo apt install zip unzip openssl mongo-tools
mkdir -p ~/.config && touch ~/.config/ssh-agent.pid
ssh-agent-manage.sh
into your .bashrc
or .bash_profile
or similarkillall -9 ssh-agent
This snippet, when included in .bashrc
, will ensure that your session has a working ssh-agent
with all your ssh keys loaded into it. It does this without creating separate ssh-agent
processes by:
Running BurpSuite on a HiDPI display, and that makes the interface window tiny and unreadable?
Just set the _JAVA_OPTIONS
environment variable so that it includes -Dsun.java2d.uiScale=2
On Linux, you can edit the BurpSuiteCommunity
executable shell script wherever it's been installed, to include the following line near the top (below the #!
line, though!):
export _JAVA_OPTIONS="-Dsun.java2d.uiScale=2"
#!/usr/bin/env bash | |
oc_ver="8.10" | |
echo "Autobuild OpenConnect $oc_ver" | |
echo " " | |
echo "This script uses apt-get and make install via sudo rights" | |
echo "To simplify this, we're going to use sudo -v to pre-authenticate you" | |
sudo -k | |
sudo -v |
#!/usr/bin/env bash | |
set -eu -o pipefail | |
## based on work by Mr. Macintosh: https://mrmacintosh.com/how-to-enable-the-mac-startup-chime-on-your-2016-macbook-pro/ | |
## hattip DaringFireball: https://daringfireball.net/linked/2020/02/25/mac-startup-chime | |
##======================================================================== | |
## To the extent possible under law, Darren Meyer has waived all copyright | |
## and related or neighboring rights to setchime.sh | |
##======================================================================== |