
Digital Product Manager & Social Entrepreneur


Rails: Authenticating with Devise
I've been working with the Stripe API lately and I thought it might be handy to write a simple Ruby on Rails application that integrates Ruby on Rails,...

Rails: Installing RoR using RVM
There are many ways to install Ruby on Rails but the current trend is to use a package manager to keep things in order. The best two options...
Rails: Validating Your Models
Rails is all about patterns and when you're creating models, it's important to set pattern-based rules before you publish to your database. Below are simply a few pattern...
Ruby Sinatra
Rails is terrific, but if you're new to web development, I suggest you give Sinatra a try first. Not only is it excellent for building small web apps,...
Ruby: Using Time
There are many functions available for Time, Month, Day, and Year. Below are a few examples. # Find out the Current Time t = Time.now # Find out the Month,...
Ruby: Encrypting passwords for a database using one-way hash technique (SHA1)
Before you save a password to a database, it may make sense to encrypt it. That way, when you do some user authentication, you can compare the users...
Ruby: Validate a Credit Card Number
Download the Credit Card Library from Lucas Carlson. sudo gem install creditcard# Checksum Digit, there is an algorithm that checksum must match # A. Import the libraries require 'rubygems'...
Ruby: How to parse an RSS Feed
Here's a short example of how to parse an RSS feed using Ruby. require 'rss' require 'open-uri' open('https://www.chrisjmendez.com/rss/') do |http| response = http....
How to install Rails 6.x on a Mac
We will use four different package managers to set up our environment. Homebrew is a package manager for Mac. We will use brew to install rbenv. rbenv is...
Ruby: Web 2.0 Name Generator
Name Generator in the style of a Web 2.0 company.
Ruby: Sum of Fibonacci odd numbers
What is the sum of all odd numbers in the Fibonnoci sequence that are less than 5000? class Fibonacci def initialize @a = 1 @b = 1 @total = 0 end...
Ruby: SMPTE Converter
Convert a frame number to an SMPTE string or vice versa.
Ruby: Mixing in a Module immediately after an object's Singleton class
There are two ways to insert a Module above the objects singleton class but before the objects Class. # You can open the class definition body of a singleton...
Show .hidden folders and files in Os X Leopard
Some applications such dump itty bitty hidden files that will screw up your workflow if you don't manage them. Here's how to quickly identify them. defaults write com....
Ruby: Open a text file and re-write its contents into a new text file
Basic example of how to open a text file and print them (including line-numbers) into a new text file. Example 1 - Long-handcounter = 1 old_file = File.open(...
Ruby: Simple Example of Threading
You can run functions in parallel without any problems as long as you have enough memory in your computer and none of your functions are dependent on one...
Ruby: Encrypting / Decrypting Passwords using EzCrypto
Encrypting / Decrypting Passwords using EzCrypto
Ruby: Converting an array into YAML, Loading YAML into an array
# A. Import the YAML Library require 'yaml' # B. Create an array names = %w[chris sandy josie billy suzie] # Example 1 : Converting an array into YAML using: to_yaml...