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
Recipe.all.each(&:save) | |
YAML::load( File.open( 'README' ) ) | |
self.class.helpers.link_to( | |
include ActionController::UrlWriter |
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 | |
db_name=$1 | |
db_dump_file=$2 | |
echo "Dropping the database ${db_name}..." | |
mysqladmin5 drop ${db_name} --user=root | |
echo "Creating the database ${db_name}..." | |
mysqladmin5 create ${db_name} --user=root | |
echo "Restore structure and data from ${db_dump_file}" |
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 | |
db_name=$1 | |
date_time=`date +%Y%m%d_%H%M_%S` | |
file_name=${db_name}_${date_time}.sql | |
echo "Dumping the database ${db_name} in ${file_name}..." | |
mysqldump5 ${db_name} --user=root > ${file_name} | |
echo "Sayonara" |
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 | |
db_name=$1 | |
date_time=`date +%Y%m%d_%H%M_%S_` | |
file_name=${date_time}${db_name}.sql | |
echo "Dumping the database ${db_name} in ${file_name}..." | |
mysqldump5 pregnancy_directory_development --user=root > ${file_name} | |
echo "Sayonara" |
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 'yaml' | |
class Company | |
attr_accessor :name, :street, :town, :state, :postcode, :phone, :website, :fax, :categories | |
end | |
y = File.open( "companies.yaml" ) | |
counter = 0 | |
yp = YAML::load_documents( y ) { |doc| |
NewerOlder