Skip to content

Instantly share code, notes, and snippets.

View prestidigitation's full-sized avatar

Alexander Rowland prestidigitation

  • Greater Los Angeles, CA
View GitHub Profile
@prestidigitation
prestidigitation / README.md
Created February 9, 2021 22:04 — forked from tristanm/README.md
Migrating a Rails project from MySQL to PostgreSQL

Migrating a Rails project from MySQL to PostgreSQL

This brief guide is written from my own experience with migrating a large (~5GB) MySQL database to PostgreSQL for a Rails project.

No warranties, guarantees, support etc. Use at your own risk and, as always, ENSURE YOU MAKE BACKUPS FIRST!

I chose [pgloader][1] because it's extremely fast. YMMV.

  1. Replace mysql2 gem with pg in Gemfile.
  2. Update config/database.yml for PostgreSQL. I used [Rails' template][2] as a starting point.

Installing Arch Linux with EFI and GRUB

  • Download the Arch Linux ISO (torrent recommended).

  • Create a live USB of Arch Linux.

    • In GNU/Linux:
      • Find out the name of your USB drive with lsblk. Make sure that it is not mounted.
      • Run the following command, replacing /dev/**sdx** with your drive, e.g. /dev/sdb. (Do not append a partition number, so do not use something like /dev/sdb**1**)
      • dd bs=4M if=path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync
@prestidigitation
prestidigitation / p0_2.2r2.txt
Last active April 5, 2017 21:18
Phase 0 2.2 Release 2
1. What is a block-level element? What are some examples of block-level elements? What are they used for?
A block-level element occupies the entire space of its parent element (a.k.a. container), thereby constituting a "block". Examples of block-level elements include: <nav> <form> <div> <pre>.
<nav> Used for a section of a page that links to other pages or parts within the page.
<form> Document section that contains interactive controls to submit info to a web server.
<div> Generic container for flow content and doesn't inherently represent anything. Used for such things as grouping elements for purposes such as styling.