Skip to content

Instantly share code, notes, and snippets.

View nilsou's full-sized avatar

Nils Hayat nilsou

View GitHub Profile
@albertbori
albertbori / Installation.md
Last active March 28, 2024 13:29
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
@andrewroycarter
andrewroycarter / Cocoapods Environment.md
Last active August 17, 2023 10:44
Directions on installing chruby, ruby, ruby-build, and bundler.

Setting up a good cocoapods environment

Before you start

Make sure that you have the latest version of Xcode installed from the Mac App Store, and that you have the command line tools installed. To install the command line tools, open Xcode, click Xcode->Preferences->Downloads->Command Line Tools

Install brew if needed.

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@cliss
cliss / organize-photos.py
Created October 6, 2013 14:43
Photo management script. This script will copy photos from "~/Pictures/iPhone Incoming" into a tree the script creates, with folders representing month and years, and photo names timestamped. Completely based on the work of the amazing Dr. Drang; see here: http://www.leancrew.com/all-this/2013/10/photo-management-via-the-finder/ You can see more…
#!/usr/bin/python
import sys
import os, shutil
import subprocess
import os.path
from datetime import datetime
######################## Functions #########################