Skip to content

Instantly share code, notes, and snippets.

View jimklo's full-sized avatar

Jim Klo jimklo

View GitHub Profile
@GerHobbelt
GerHobbelt / .gitignore
Created July 24, 2012 23:02
d3.js: load Adobe Photoshop ASE color palette file to color graph
# Editor backup files
*.bak
*~
@sente
sente / objwalk.py
Created December 15, 2011 09:54
Recursively walk Python objects (Python recipe)
"""
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 December 1, 2023 01:01
How to send a text message with python
# 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
@albertbori
albertbori / Installation.md
Last active April 19, 2024 00:16
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

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