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
| # NCERT books are excellent but being altered for political or other reasons | |
| # See: https://twitter.com/SouthAsiaIndex/status/1518062204058103809 | |
| # To download the entire current set, run this script with Ruby | |
| require 'httparty' | |
| source = HTTParty.get('https://ncert.nic.in/textbook.php').force_encoding("ISO-8859-1").encode("utf-8", replace: nil) | |
| # book names are like aeen1dd.zip | |
| # First letter tells the class number a to l is class 1 to class 12. m stands for class 11 and 12 combined |
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 'nokogiri' | |
| require 'fileutils' | |
| require 'date' | |
| require 'uri' | |
| # usage: ruby import.rb my-blog.xml | |
| # my-blog.xml is a file from Settings -> Basic -> Export in blogger. | |
| data = File.read ARGV[0] |
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
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
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
| generators = [] | |
| puts 'Spinning up a new app, captain!' | |
| devise = yes?('Use Devise? (yes/no)') | |
| jquery = yes?('Use jQuery? (yes/no)') | |
| jquery_ui = yes?('Use jQuery UI? (yes/no)') if jquery | |
| mongoid = yes?('Use mongoid? (yes/no)') | |
| haml = yes?('Use haml? (yes/no)') | |
| rspec = yes?('Use Rspec? (yes/no)') |