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 | |
## @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 |
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 | |
## @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 |
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
echo "$STRING" | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z |
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
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 ) |