Skip to content

Instantly share code, notes, and snippets.

View rickychilcott's full-sized avatar

Ricky Chilcott rickychilcott

View GitHub Profile
@rickychilcott
rickychilcott / gist:3795681
Created September 27, 2012 18:47
DPS Desktop Tools CS6
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AdobeSetupType</key>
<string>ProductInstall</string>
<key>catalogs</key>
<array>
<string>4-Staging.plist</string>
</array>
@rickychilcott
rickychilcott / gist:3414537
Created August 21, 2012 10:59
MunkiServer Debug
def get_hostname(ip)
hostname = Socket.gethostbyaddr(ip.split(".").map(&:to_i).pack("CCCC")).first # Get hostname
logger.warn "Request IP: #{ip}" # Print IP input
logger.warn "Request Hostname: #{hostname}" # Print hostname output
"localhost"
end
@rickychilcott
rickychilcott / gist:3353131
Created August 14, 2012 21:21
Nilm Output
$ pwd
/Users/chilcotr/Desktop/PluralEyes Licenser
$ ls -la
total 288
drwxr-xr-x 4 chilcotr staff 136 Aug 14 17:14 .
drwxr-xr-x+ 31 chilcotr staff 1054 Aug 14 17:14 ..
-rw-r--r--@ 1 chilcotr staff 6148 Aug 14 17:14 .DS_Store
-rw-r--r--@ 1 chilcotr staff 137936 Aug 14 17:12 Nilm
@rickychilcott
rickychilcott / gist:3285060
Created August 7, 2012 12:50
Remove Unused Accounts (with keepable list)
#!/bin/bash
# List of users to keep
KEEP=$( cat <<EOL
/Users/admin
/Users/sccadmin
/Users/mdiaadmin
/Users/Shared
/Users/Search
EOL);
jQuery ->
new ImageCropper()
class ImageCropper
constructor: ->
$('#cropbox').Jcrop
aspectRatio: 1
setSelect: [0, 0, 600, 600]
onSelect: @update
onChange: @update
@rickychilcott
rickychilcott / gist:2875326
Created June 5, 2012 14:24
Up and running with MunkiServer
Prerequisites
===
install command line tools for xcode or (xcode + command line tools) # needed to build ruby and provides libraries for ruby/rails
install homebrew # easy package management
install git # source code management system
install rvm # easy eway to install new versions of ruby
install munkitools # allows introspection into
MunkiServer Install
===
#!/bin/bash
echo "#!/bin/bash" > /tmp/loginfix.sh
echo "rm /Users/*/Library/Preferences/ByHost/com.apple.loginwindow.*" >> /tmp/loginfix.sh
mv /tmp/loginfix.sh /usr/bin/loginfix.sh
chmod +x /usr/bin/loginfix.sh
defaults write com.apple.loginwindow LoginHook /usr/bin/loginfix.sh
Started PUT "/communication/packages/Adobe_Photoshop_Lightroom_4" for 132.235.56.150 at 2012-04-20 16:20:23 -0400
Processing by PackagesController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"Xas3W6tTYiouvBHijKZckbr6QeYzVE+CzB1kenCJ7j4=", "package"=>{"display_name"=>"Adobe Photoshop Lightroom 4", "version"=>"4.0", "package_category_id"=>"2", "RestartAction"=>"None", "minimum_os_version"=>"", "maximum_os_version"=>"", "environment_id"=>"1", "supported_architectures"=>["", "i386", "x86_64"], "shared"=>"0", "force_install_after_date_string"=>"", "description"=>"", "update_for_tas"=>[""], "requires_tas"=>[""], "installer_type"=>"copy_from_dmg", "uninstall_method"=>"remove_copied_items", "uninstall_script"=>"", "uninstaller_item_location"=>"", "autoremove"=>"0", "uninstallable"=>"1", "unattended_install"=>"0", "unattended_uninstall"=>"0", "receipts_plist"=>"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/
@rickychilcott
rickychilcott / gist:2002279
Created March 8, 2012 17:39
munkiserver preflight
#!/usr/bin/ruby
require 'osx/cocoa'
include OSX
MAC_ADDRESS = `ifconfig en0 | awk '/ether/ {print $2}'`.strip
BUNDLE_ID = "ManagedInstalls"
def set_preference(key, value)
CFPreferencesSetValue(key, value, BUNDLE_ID, KCFPreferencesAnyUser, KCFPreferencesCurrentHost)
@rickychilcott
rickychilcott / gist:1958219
Created March 2, 2012 12:51
MunkiServer Data Gather
#!/bin/sh
#Connect to server
REMOTE_DRIVE="/Volumes/DataRepo"
mkdir -p $REMOTE_DRIVE
/sbin/mount_afp "afp://server/MSJoiner" $REMOTE_DRIVE
#First Drive
LOCAL_DRIVE=${DS_LAST_RESTORED_VOLUME}