Skip to content

Instantly share code, notes, and snippets.

Rails.MN Tutorial

Welcome to the Rails.MN Tutorial of Ruby on Racetracks! Although the Rails.MN group is dedicated to Ruby on Rails, the web site is static and uses Ruby's Jekyll tool instead of Rails.

Prerequisites

  • You should have version 4 of SparkyLinux installed as your host OS or virtual OS. You may also use any other Linux distro based on Debian Stretch. If you are using a Mac or Windows, you can use a VirtualBox virtual machine with SparkyLinux on it. For more details, go through the VirtualBox Tutorial.
  • You should have Docker installed in your SparkyLinux desktop Linux setup. This is covered in chapter 1 of the Docker Tutorial.
  • You should be familiar with the Docker way of developing in Jekyll. This is covered in the Docker tutorial.
  • You should have an account on GitHub.

Optimizing Virtual Windows

WARNING

Disabling updates and security features is a security risk. Do NOT log in to anything or enter your password. If you need to record video, do it from your host system.

Where to get Virtual Windows (FREE)

Microsoft Edge Virtual Machines

Speeding Up Windows

  • Disable the antivirus software

Screencast Cheat Sheet

Free Recording Software

  • Linux: SimpleScreenRecorder
  • Mac: ActivePresenter
  • Windows: Use Windows in a virtual machine with a Linux or Mac host, and record from the host machine.

Preparing the Demo Setup

  • Add lxterminal as a replacement for xfce4-terminal (MX Linux):

Computer Setup

ThunderBird

Message filter location: /home/(username)/.thunderbird/(8 random characters).default/ImapMail/(account name)/msgFilterRules.dat

User Gravatars

This document explains how to display the user's gravatar on his/her profile page.

Prerequisite

In the procedure described here, it is assumed that you used the GenericApp gem.

User Profile Page

In the app/views/users/show.html.erb file, enter the following code at the location at which you wish to display the user gravatar:

<%= gravatar_for @user %>
@jhsu802701
jhsu802701 / virtualbox_cheatsheet.md
Last active March 14, 2017 04:45
Optimizing virtual machine settings and setting up a shared folder

VirtualBox Cheat Sheet

Hardware BIOS Settings

  • Make sure that virtualization technology is enabled.

VirtualBox Settings

  • Use a FIXED disk size instead of a dynamic disk.
  • Allocate half of the host system memory to the guest system. (Use more if you can stay in the green zone.)
  • System/Processor: Enable multiple cores (if possible), set the execution cap to 100%, and enable PAE/NX.
  • System/Acceleration: Enable VT-x/AMD-v and Nested Paging.
LOGO: https://upload.wikimedia.org/wikipedia/commons/thumb/0/03/Zeichen_282.svg/220px-Zeichen_282.svg.png
Wallpaper: https://www.flickr.com/photos/hausfrau/2274821477/

Set Up MN Pay

  • System
sudo apt-get update
sudo apt-get install -y python-pip python-dev
sudo apt-get install -y subversion gfortran
npm install -g webpack
  • Build

Cheat Sheet for Kdenlive

Installing in VirtualBox

  • OS: MX Linux
  • Allocate half of the host system memory to the guest system
  • System/Processor: enable multiple cores (if possible) and PAE/NX
  • User Interface: enable "show at top of screen"
  • Commands to run in guest OS:
sudo apt-get update; sudo apt-get install -y kdenlive

Cheat Sheet for Adding Google Authentication to A Ruby on Rails App

Prerequisites

A Ruby on Rails app with authentication provided through the devise gem

Elements

Google API setup

  • Go to https://console.developers.google.com and create your project.
  • In your new project, enable the Google+ API and Contacts API.
  • Go to Credentials, then select the "OAuth consent screen" tab on top, and provide your email address and product name.