This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Compare two directories using rsync and print the differences | |
# CAUTION: options MUST appear after the directories | |
# | |
# SYNTAX | |
#--------- | |
# diff-dirs Left_Dir Right_Dir [options] | |
# | |
# EXAMPLE OF OUTPUT | |
#------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# get current dir | |
prog_dir="/opt/$(ls /opt/ | grep gitkraken | grep -v tar)" | |
if [ "$prog_dir" == "/opt/" ] | |
then | |
prog_dir="" | |
fi | |
echo "DIR: $prog_dir" | |
if [ -f $prog_dir/gitkraken ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from re import findall | |
from subprocess import check_output | |
def getOrderedInterfaces(): | |
"""Returns all ethernet interfaces in service order.""" | |
interfaces = check_output(['networksetup', '-listnetworkserviceorder']) | |
matches = findall(r' en[\d]+', interfaces) | |
return [ i.lstrip(' ') for i in matches ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
import sys | |
import os | |
# We need to import the relvant object definitions from PyObjC | |
from AppKit import * | |
from PyObjCTools import AppHelper |