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
config.active_record.colorize_logging = false | |
log_pipe = IO.popen("/usr/sbin/rotatelogs #{RAILS_ROOT}/log/quandu_staging_log.%Y%m%d 86400", 'a') | |
config.logger = Logger.new(log_pipe) |
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
namespace :geoserver do | |
jetty_dir = ENV['dir'] || 'geoserver-2.0.1' | |
jetty_start_port = ENV['port'] || 8983 | |
jetty_stop_port = ENV['stop_port'] || 8079 | |
jetty_stop_key = ENV['stop_key'] || 'STOPME' | |
java_opts = 'Xmx512m -Xms512m' | |
desc 'Starts geoserver; will attempt to stop jetty/geoserver first.' | |
task :start=>['stop'] do |
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
gem install --no-ri --no-rdoc bundler rails | |
gem install --no-ri --no-rdoc sqlite3-ruby heroku |
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
#generate("cucumber") | |
#run("rm -rf features") | |
#git(:clone => "git://github.com/ultrasaurus/workshop-features.git") | |
#run("mv workshop-features features") | |
#inside("features") { run("rm -rf .git") } | |
rake("db:migrate") |
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
#env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config | |
heroku db:push mysql://root@localhost/deca_development?encoding=utf8 |
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
#!/usr/bin/env ruby | |
image_path = "archive/files" | |
thumbnail_path = "archive/thumbnails" | |
Dir["#{image_path}/*.jpg"].each do |image| | |
fname = File.basename(image) | |
puts "Converting #{fname}..." | |
`convert #{image_path}/#{fname} -thumbnail '300' -gravity Center +repage -strip #{thumbnail_path}/#{fname}` |
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
#! /usr/bin/env ruby | |
base_path = "Surveys_Images" | |
dest_dir = 'footprints' | |
Dir["#{base_path}/**/*mages/*.pdf"].each do |pdf| | |
fname = File.basename(pdf, '.pdf') | |
puts "Converting #{fname}..." | |
`convert #{pdf.gsub(/ /, '\ ')} #{dest_dir}/#{fname.gsub(/ /, '')}.jpg` | |
end |
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 | |
# Go into the library paths and updates git bundles | |
echo 'Updating Pristine copy in /Library/Application Support/TextMate/ Pristine Copy/Bundles' | |
find ~/"Library/Application Support/TextMate/Pristine Copy/Bundles" -name .git -execdir git pull --quiet \; | |
echo 'Updating /Library/Application Support/TextMate/Bundles' | |
find ~/"Library/Application Support/TextMate/Bundles" -name .git -execdir git pull --quiet \; | |
echo 'Updating Library/Application Support/TextMate/Pristine Copy/Bundles' | |
find ~/"Library/Application Support/TextMate/Pristine Copy/Bundles" -maxdepth 2 -name .svn -execdir svn up --quiet \; | |
echo 'Updating Library/Application Support/TextMate/Bundles' |
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
@base_value = 5 | |
@string_value = "This is awesome!!! " | |
def write_awesome_stuff | |
puts "Ruby is an awesome language" | |
end | |
def write_message(name) | |
puts "#{name} is an awesome programmer." | |
end |
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
require 'open3' | |
require 'open-uri' | |
require 'rubygems' | |
require 'nokogiri' | |
search = 'rocket science' | |
results = open "http://search.lib.virginia.edu/catalog?q=#{URI.escape(search)}&per_page=2" | |
Open3.popen3('say -v Vicki') do |stdin, stdout, stderr| | |
stdin << "Virgo results for #{search}..." |
OlderNewer