This file contains hidden or 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 'open-uri' | |
| require 'nokogiri' | |
| require 'yaml' | |
| start = 1 | |
| INCREMENT = 50 | |
| has_more = true | |
| File.open('universities.yml', 'w') do |file| | |
| while has_more do |
This file contains hidden or 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 'rubygems' | |
| require 'bundler' | |
| require 'fileutils' | |
| TMP_DIR = "/tmp/gems" | |
| #If directory exists, delete it and recreates. | |
| FileUtils.rm_rf(TMP_DIR) if File.exists?(TMP_DIR) | |
| FileUtils.mkdir TMP_DIR |
This file contains hidden or 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 'rubygems' | |
| require 'dm-core' | |
| require 'dm-migrations' | |
| require 'dm-timestamps' | |
| DataMapper::Logger.new($stdout, :debug) | |
| DataMapper.setup(:default, "mysql://root@localhost/db_development") | |
| class Tester | |
| include DataMapper::Resource |
This file contains hidden or 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 | |
| usage() | |
| { | |
| cat << EOF | |
| usage: $0 options | |
| This script set ownership for all table, sequence and views for a given database | |
| Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto |
NewerOlder