Skip to content
This repository was archived by the owner on Aug 2, 2021. It is now read-only.

jakewmeyer/Ruby-Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Imgur

Ruby Scripts

A collection of ruby scripts for those who live in the command line.

GitHub release Gem Language license Platform

Network Tools / Stock Finder / File Encryptor / Currency Converter / Weather / Movie Search



Install / Setup

Install the scripts easily as a ruby gem

gem install jake-scripts

Netgeo - IP network utility

CLI utility for returning LAN, WAN, Router, and DNS IP's, as well as Geodata on current or specific IP's. Outputs clean results to make all your piping dreams come true. | 👍 |

Netgeo is separate gem available here

gem install netgeo

NOTE: If no IP is specified, your current public IP is used

=> netgeo -s ip,city,region 12.34.56.78

=> 12.34.56.78
   Huntington
   WV

Imgur

Stock Search - Returns current stock information

Imgur

Currency Exchange - Returns converted currency based on realtime exchange rates

Uses Fixer.io for exchange data.

Uses Ruby Money for conversion accuracy + currency symbols

Imgur

File Encryptor - Uses OpenSSL to encrypt and decrypt files with a password

encrypt [original file] [encrypted file]
decrypt [encrypted file] [output file]

Encryption Details

  • Uses AES 256 level encryption
  • Key is salted before creation
  • Password is never in plain text, and OpenSSL generates key based on password
  • Data is encrypted in Base64, so it can be used as plain text in an email. (Not usually necessary if attached as a file)

Tested With => .pdf, .txt, .docx, .doc, .png, .jpeg

CAUTION => Make sure to use different filenames, otherwise your file will be overwritten!

Imgur

Weather Search - Returns current weather information based on IP

Uses the APIXU weather api.

Imgur

Movie Search - Uses OMDB API to return movie data

Uses the OMBDB API.

Imgur

IP Tools - Old Versions

  • NOTE: The three scripts below have been replaced by the netgeo script, which combines the functionality of all three into a single, easier to use script. These have nice formatting, but singular functionality. I'll continue to keep them in the repo for those who like the formatted output, but I recommend using the new version, instead of the deprecated ones.

Imgur

Imgur

Imgur

API Keys

Users now have the option to set their own API keys through environment variables thanks to sethkrasnianski

export OMDBAPI_API_KEY=key
export APIXU_API_KEY=key

Gems Used

  • Rest-Client - Client for making HTTP requests in ruby
  • Ruby Money - Ruby gem for accurate currency management
  • Monetize - Ruby gem for money object creation
  • Slop - Ruby CLI option parsing framework
  • OS - Ruby gem for operating system identification

FAQ / Contact

  • If you run into any issues, please open an issue ASAP and we'll work to get it resolved and merged.
  • All Programs are fully functional, with live API keys baked in.
  • NOTE: ip_list will only work on a Mac, due to OS specific commands used in the program.
  • Terminal used is Hyper.js -> Background Color: #292937
  • Using Oh-My-Zsh, Robby Russell theme, zsh-syntax-highlighting, and zsh_autosuggestions

About

A collection of ruby scripts for those who live in the command line

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages