Răzvan Cosma's scratchpad

random scripts of random value

Browsing Posts in OS X

my .bash_profile

Comments off

shopt -s checkwinsize shopt -s histappend HISTFILESIZE=1000000 HISTSIZE=1000000 HISTCONTROL=ignoreboth HISTTIMEFORMAT=’%F %T ‘ shopt -s cmdhist PROMPT_COMMAND=’history -a’ alias mc=’caffeinate -i mc -d’ export CLICOLOR=1 export EDITOR=’/usr/local/bin/joe’ complete -C aws_completer aws eval “$(~/repos/rakudobrew/bin/rakudobrew init -)” eval “$(rbenv init -)”

You won’t need this if you connect with Apple’s client or with Jolly’s FastVNC. Most other clients though (tightvnc) require an initial password instead of presenting OS X’s login window. From a root prompt: Turn Screen Sharing off: sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -stop cat > /Library/Preferences/com.apple.RemoteManagement.plist <!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”> <plist version=”1.0″> <dict> <key>ARD_AllLocalUsers</key> […]

The error is caused by OS X trying to save metadata for copied files in resource forks (NT terminology) / named streams (Mac terminology). If the server (usually Samba) doesn’t support this it can be disabled 1. For a Mac user, when connecting to any SMB server, write [default] streams=no in ~/Library/Preferences/nsmb.conf 2. For all […]

Uninstall a .pkg

Comments off

The OS X installer doesn’t offer a default tracking method for the files created by Installer packages (.pkg). While the list of files copied is present within the package, and is saved in /Library/Receipts/packagename, scripts run during install can create/modify others, and I think they can only be detected by running the install chrooted. Anyway, […]

Maybe 10 if you’re a slow typist. In short: osascript -e ‘tell app “ARDAgent” to do shell script “/Applications/iTerm.app/Contents/MacOS/iTerm”‘ You might get a few screenfulls of errors but the command WILL execute: This is by far the dumbest bug I’ve encountered in the past decade, and one that makes me appreciate for the first time […]

Bad Behavior has blocked 248 access attempts in the last 7 days.