Skip to content

Instantly share code, notes, and snippets.


Jim Klo jimklo

View GitHub Profile
albertbori /
Last active May 27, 2023 10:11
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac


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
GerHobbelt / .gitignore
Created July 24, 2012 23:02
d3.js: load Adobe Photoshop ASE color palette file to color graph
View .gitignore
# Editor backup files
sente /
Created December 15, 2011 09:54
Recursively walk Python objects (Python recipe)
A small function that walks over pretty much any Python object and yields the
objects contained within (if any) along with the path to reach them. I wrote it
and am using it to validate a deserialized data-structure, but you can probably
use it for many things.
Example use: In one configuration mechanism I implemented, there exists an
UNCONFIGURED sentinel that marks configuration items that are required but
alexle /
Last active March 29, 2023 20:55
How to send a text message with python
# Sends sms message to any cell phone using gmail smtp gateway
# Written by Alex Le
import smtplib
# Use sms gateway provided by mobile carrier:
# at&t:
# t-mobile:
# verizon: