most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat| #!/bin/bash | |
| if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
| appify v3.0.1 for Mac OS X - http://mths.be/appify | |
| Creates the simplest possible Mac app from a shell script. | |
| Appify takes a shell script as its first argument: | |
| `basename "$0"` my-script.sh |
| I use Homebrew and wanted to install pip for mercurial. Pip requires a homebrew-installed version of Python, which is fine and dandy; however, I noticed that webkit2png was broken after I installed Python with Homebrew (it was missing pyobjc libs, which comes with the OS X Python install by default). | |
| This assumes that the current homebrewed version of Python is 2.7.1 and that homebrew is set up for /usr/local. If that's not the case, you may have to change the minor version of setuptools (e.g. from 2.7 to 2.8) and change the PATH accordingly. | |
| $ brew install python | |
| Modify your PATH to include the path to Python's bin directory: | |
| export PATH="/usr/local/Cellar/python/2.7.1/bin:/usr/local/bin:$PATH" |
| # from https://libbits.wordpress.com/2011/04/09/get-total-rsync-progress-using-python/ | |
| import subprocess | |
| import re | |
| import sys | |
| print('Dry run:') | |
| cmd = 'rsync -az --stats --dry-run ' + sys.argv[1] + ' ' + sys.argv[2] | |
| proc = subprocess.Popen(cmd, | |
| shell=True, |
| <!DOCTYPE html> | |
| <script src="http://mbostock.github.com/d3/d3.v2.js?2.8.1"></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
| <style> | |
| body { | |
| font: 10px sans-serif; | |
| } | |
| rect { |
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
| #!/bin/bash | |
| # | |
| # The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext | |
| # which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just | |
| # from time to time | |
| # | |
| # Usage: ./checkpoint.sh | |
| # | |
| # The script checks if Enpoint Security VPN is running. If it is, then it shuts it down, if it is not, it fires it up. | |
| # Or, make an Automator action and paste the script. |
| import sys | |
| from subprocess import Popen | |
| from Tkinter import Tk, StringVar | |
| import ttk | |
| START, STOP = "start", "stop" | |
| # just some arbitrary command for demonstration | |
| cmd = [sys.executable, '-c', """import sys, time | |
| print("!") |
rsync (Everyone seems to like -z, but it is much slower for me)