Function | Shortcut |
---|---|
New Tab | ⌘ + T |
Close Tab or Window | ⌘ + W (same as many mac apps) |
Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
Cycle iTerm Windows | ⌘ + backtick (true of all mac apps and works with desktops/mission control) |
import re | |
import argparse | |
re_attention = re.compile(r""" | |
\\\(| | |
\\\)| | |
\\\[| | |
\\]| | |
\\\\| | |
\\| |
###Network Policy Server Synchronization Script | |
#This script copies the configuration from the NPS Master Server and imports it on the secondary server. | |
#The Account that this script runs under must have Local Administrator rights to the NPS Master. | |
#This was designed to be run as a scheduled task on the NPS Secondary Servers on an hourly,daily, or as-needed basis. | |
# Modified from https://deployhappiness.com/two-network-policy-server-tricks-subnets-and-syncing/ | |
###Variables | |
#NPSMaster - Your Primary Network Policy Server you want to copy the config from. | |
$NPSMaster = "adds0.corp.contoso.com" | |
$NPSSecondary = "adds1.corp.contoso.com" |
#!/bin/sh | |
/usr/bin/ldapsearch -o ldif-wrap=no "$@" | perl -MMIME::Base64 -Mutf8 -pe 's/^([-a-zA-Z0-9;]+):(:\s+)(\S+)$/$1.$2.&decode_base64($3)/e' |
#!/usr/bin/env python | |
# Copyright (c) 2009, David Buxton <[email protected]> | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are | |
# met: | |
# | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
<?xml version="1.0" encoding="utf-8"?> | |
<service> | |
<short>Zabbix-Agent</short> | |
<description>Zabbix Agent listening port</description> | |
<port protocol="tcp" port="10050" /> | |
</service> |
def ip2hex(cidr, router): | |
addr, mask = cidr.split("/") | |
mask = int(mask) | |
addr = [("%2s" % hex(int(i))[2:]).replace(" ", "0") for i in addr.split(".") if i != "0"] | |
parts = mask/8 - len(addr) | |
if mask%8 > 0: | |
parts += 1 | |
if parts > 0: | |
for i in range(int(parts)): | |
addr.append("00") |
This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.
Most the credit for these changes go to Dave Holland.
- Mac OSX 10+
- Administrator privileges
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: