Skip to content

Instantly share code, notes, and snippets.

View ppo's full-sized avatar

Pascal Polleunus ppo

View GitHub Profile
@scottrigby
scottrigby / plistGitDiff
Created January 7, 2017 22:16
Shows git diff of tracked plist files
#!/bin/bash
## @file
## Shows git diff of tracked plist files.
##
## Normally, Mac plist files are binary, so git diffs do not display. However,
## there are cases where seeing diffs is important. For example, when tracking
## changes via Mackup's git storage option.
##
## @see http://confusatory.org/post/133141617492/git-diff-for-binary-apple-property-list-files
@scottrigby
scottrigby / plistDiff
Created January 7, 2017 22:15
Shows CLI diff between two plist files
#!/bin/bash
## @file
## Shows CLI diff between two plist files.
##
## Normally, Mac plist files are binary, so diffs do not display. However,
## there are cases where seeing diffs is important. For example, when tracking
## changes via Mackup's git storage option.
##
## Note this option allows seeing plist diffs without fully installing Xcode
@oneohthree
oneohthree / quick-slugify.sh
Last active February 22, 2024 01:53
Quick bash slugify
echo "$STRING" | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z
@batok
batok / paramiko_example.py
Created April 10, 2012 16:11
Paramiko example using private key
import paramiko
k = paramiko.RSAKey.from_private_key_file("/Users/whatever/Downloads/mykey.pem")
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
print "connecting"
c.connect( hostname = "www.acme.com", username = "ubuntu", pkey = k )
print "connected"
commands = [ "/home/ubuntu/firstscript.sh", "/home/ubuntu/secondscript.sh" ]
for command in commands:
print "Executing {}".format( command )