Skip to content

Instantly share code, notes, and snippets.

View clayalvord's full-sized avatar

Clay Alvord clayalvord

View GitHub Profile
@clayalvord
clayalvord / bginfo.rb
Created July 5, 2012 19:22
Ruby script for getting system info
@user = `whoami`
@system = `scutil --get ComputerName`
@ip = (`ifconfig en0 | grep netmask`).split
@vers = (`sw_vers | grep ProductVersion`).split
@hw_info = `system_profiler`
@up = (`uptime`).split(',')
if @vers[1].include?('10.5')
@hw_name = 'Processor Name'
@hw_speed = 'Processor Speed'
@clayalvord
clayalvord / rename.rb
Created May 11, 2012 22:54
Batch File Copy or Rename
#Batch file rename/move script
Dir.chdir '/Users/username/Pictures/'
# sets destination folder
pic_names = Dir['/Users/username/Downloads/*.{jpg,JPG}']
# sets source folder
puts 'What would you like to call this batch?'
batch_name = gets.chomp