Skip to content

Instantly share code, notes, and snippets.

Avatar

Jim Klo jimklo

View GitHub Profile
@albertbori
albertbori / Installation.md
Last active Aug 5, 2022
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac
View Installation.md

Overview

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.

Requirements

  • Mac OSX 10+
  • Administrator privileges
@GerHobbelt
GerHobbelt / .gitignore
Created Jul 24, 2012
d3.js: load Adobe Photoshop ASE color palette file to color graph
View .gitignore
# Editor backup files
*.bak
*~
@sente
sente / objwalk.py
Created Dec 15, 2011
Recursively walk Python objects (Python recipe)
View objwalk.py
"""
http://code.activestate.com/recipes/577982-recursively-walk-python-objects/
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
alexle / pythonsms.py
Last active Jan 21, 2022
How to send a text message with python
View pythonsms.py
# sms.py
# 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: number@mms.att.net
# t-mobile: number@tmomail.net
# verizon: number@vtext.com