Skip to content

Instantly share code, notes, and snippets.

Always learning!

Bennett Smith BennettSmith

Always learning!
  • San Francisco Bay Area, CA
View GitHub Profile
View key_authorization.rb
def authorize_key_for_root(config, *key_paths)
[*key_paths, nil].each do |key_path|
if key_path.nil?
fail "Public key not found at following paths: #{key_paths.join(', ')}"
full_key_path = File.expand_path(key_path)
if File.exists?(full_key_path)
config.vm.provision 'file',
# Create the script that emits values for a single file using stat.
cat >/tmp/ <<FILEPERMS
echo chmod `stat -f '%Lp' \$1` \"\$1\"
echo chown `stat -f '%u' \$1`:`stat -f '%g' \$1` \"\$1\"
# Make sure the script is executable
BennettSmith /
Created Mar 25, 2012 — forked from dsibilly/
Unique Build Numbers for XCode 4
# XCode 4 auto-versioning script for Git
# Inspired by the work of Axel Andersson, Marcus S. Zarra and Matt Long
NOTE: Due to its use of build environment variables, this
script will only work from inside XCode's build process!
import os