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 'uri' | |
require 'open-uri' | |
require 'rubyful_soup' | |
begin | |
print "\n\nEnter website to crawl (ex. http://www.google.com): " | |
url = gets | |
puts url | |
uri = URI.parse(url) | |
html = open(uri).read |
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
print "enter loan amount: " | |
loan = gets.chomp.to_i | |
print "Enter length of time in months: " | |
time = gets.chomp.to_i | |
print "Enter interest rate: " | |
rate = gets.chomp.to_f/100 | |
i = (1+rate/12)**(12/12)-1 | |
annuity = (1-(1/(1+i))**time)/i |
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 'zip/zip' | |
require 'fileutils' | |
unless ARGV[0] | |
puts "Usage: ruby decompress.rb <zipfilename.zip>" | |
puts "Example: ruby decompress.rb myfile.zip" | |
exit | |
end | |
archive = ARGV[0].chomp |
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 'zip/zip' | |
unless ARGV[0] | |
puts "Usage: ruby compress.rb <filename.ext>" | |
puts "Example: ruby compress.rb myfile.exe" | |
exit | |
end | |
file = ARGV[0].chomp |
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
if ARGV.size != 1 | |
puts "Usage: ruby fileJoin.rb <filename.ext>" | |
puts "Example: ruby fileJoin.rb myfile.txt" | |
exit | |
end | |
file = ARGV[0] | |
piece = 0 | |
orig_file = "New.#{file}" |
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
if ARGV.size != 2 | |
puts "Usage: ruby fileSplit.rb <filename.ext> <size_of_pieces_in_bytes>" | |
puts "Example: ruby fileSplit.rb myfile.txt 10" | |
exit | |
end | |
filename = ARGV[0] | |
size_of_split = ARGV[1] | |
if File.exists?(filename) |
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 'crypt/blowfish' | |
unless ARGV[0] | |
puts "Usage: ruby decrypt.rb <Encrypted_filename.ext>" | |
puts "Example: ruby decrypt.rb" Encrypted_secret.stuff" | |
exit | |
end | |
filename = ARGV[0].chomp | |
puts "Decrypting #{filename}." |
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 'find' | |
require 'digest/md5' | |
unless ARGV[0] and File.directory?(ARGV[0]) | |
puts "\n\n\nYou need to specify a root directory: changedFiles.rb | |
<directory>\n\n\n" | |
exit | |
end | |
root = 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
require 'crypt/blowfish' | |
unless ARGV[0] | |
puts "Usage: ruby encrypt.rb <filename.ext>" | |
puts "Example: ruby encrypt.rb secret.stuff" | |
exit | |
end | |
#take in the file name to encrypt as an argument | |
filename = ARGV[0].chomp |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>VidTalk</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content="Video Walkie Talkie App"> | |
<meta name="author" content="Juan Gallardo"> | |
<!-- styles --> | |
<link href="css/bootstrap.css" rel="stylesheet"> |