Homebrew is a package management system for OS X. You can read more about it here, or simply run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
to install it.
Homebrew is a package management system for OS X. You can read more about it here, or simply run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
to install it.
#!/bin/bash | |
# | |
# Set up OSX preferences | |
# | |
# Inspired by: https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
########################################### | |
# CONFIG | |
HOSTNAME="machiavellia" | |
TIMEZONE="America/Chicago" # 'systemsetup -listtimezones' |
#!/bin/bash | |
# A script to set up a new mac. Uses bash, homebrew, etc. | |
# Focused for ruby/rails development. Includes many utilities and apps: | |
# - homebrew, rvm, node | |
# - quicklook plugins, terminal fonts | |
# - browsers: chrome, firefox | |
# - dev: iterm2, sublime text, postgres, chrome devtools, etc. | |
# - team: slack, dropbox, google drive, skype, etc |
When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.
In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is 10.0.0.0/8. Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN:
DOMAIN ?= mydomain.com | |
COUNTRY := IT | |
STATE := IT | |
COMPANY := Evil Corp. | |
# credits to: https://gist.github.com/fntlnz/cf14feb5a46b2eda428e000157447309 | |
# usage: |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |