System Administration

Latest

Cloud Computing

Latest

Rails, Ruby

Latest

Ruby Classes, Modules, Mixins, and Inheritance

Classes Classes are one of the building blocks of object-oriented programming. Think of them as blueprints for creating objects. When we just throw variables and methods inside a Ruby file, it’s very loosely associated....

MySQL / Percona

Latest

How to Write Your Own Iterators in Ruby

Generally if your class has an array/hash, sometimes you don’t want to expose the implementation of those collections outside of the object. Creating your own iterator will make your object easier to use. class Headphone...

Read More

How to Revert/Undo Changes in Git

Generally there are three ways of reverting changes: checkout revert reset Checkout If you just need to revert specific files, you could run git checkout to retrieve an exact version. In the below example, I wanted to revert the...

Read More

rails console hangs

“rails c” hangs with no error messages and no response. solution: stop spring using the following command “spring stop” or “bin/spring stop” spring will automatically start back up when you...

Read More

Git Best Practices

Commit often All is not Lost git log -g git fsck –unreachable git stash list Backups Although a clone is a backup it does not include git configs, working directory/index, non-standard refs, or dangling objects. Once you...

Read More

Git Relative Refs

You could use relative refs to move branches around. e.g.,  git branch -f master HEAD~3, etc.  The “^” Operator Goes up to the first parent. e.g., git checkout master^ The “~[integer]” Operator The...

Read More

Git Tools

git rebase This allows you to copy commits/branch to another commit/branch directly. You’re taking all the changes that were committed on a branch and replaying it on another. This creates a nice linear sequence of commits...

Read More
Loading