Skip to content

Instantly share code, notes, and snippets.

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.

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

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
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/
@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.

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 %>

Computer Setup

ThunderBird

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

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):

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