Isaac Sloan - Web Developer, Photographer, Musician and Citizen of Earth
Banner700

Setting Up Ubuntu 18.04 as Rails Server

October 04, 2018

Step 1: Install Ubuntu

Step 2: Add a deploy user and optionally a user for yourself.

Assuming you're logged in as root add these users and login as "not root."

adduser deploy
adduser [yourname] #optionally
vim /etc/group
# add your users to the sudo group like so: 
  sudo:x:27:isaac,deploy
vim /etc/ssh/sshd_config
# add to file or if they exist set the flags to no.
Setting Up Ubuntu 18.04 as Rails Server

How to safely remove Byte Order Marks (BOM) from files created on windows

October 15, 2017

The problem

If you read enough files created on a windows box you'll eventually run into this. ""\xEF\xBB\xBFyour expected string" instead of "your expected string". I recently ran into again while parsing some csv files exported in windows. In order to parse the string you'll need to remove what is called a Byte Order Mark.

Solution

Just search for "\xEF\xBB\xBF" and remove it.

How to safely remove Byte Order Marks (BOM) from files created on windows

Setting up MacOS Sierra for Rails Development

December 15, 2016

One of the only differences I've noticed is installing mysql is slightly different.

Step 1: Install XCode Command Line Tools

Install xcode.

xcode-select --install

Step 2: Install and prepare Homebrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew update

Step 3: Install rbenv

brew install rbenv ruby-build openssl
Setting up MacOS Sierra for Rails Development

Ubuntu 16.04 Rails/Nginx/Passenger/MariaDB Server

October 25, 2016

Step 1: Install Ubuntu

Step 2: Add a deploy user and optionally a user for yourself.

Assuming you're logged in as root add these users and login as "not root."

adduser deploy
adduser [yourname] #optionally
vim /etc/group
# add your users to the sudo group like so: 
  sudo:x:27:isaac,deploy
vim /etc/ssh/sshd_config
# add to file or if they exist set the flags to no.
Ubuntu 16.04 Rails/Nginx/Passenger/MariaDB Server

Useful SSH Server Conf Tricks

April 24, 2016

Turning password login off

Edit /etc/ssh/sshd_conf
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
Restart ssh

sudo service ssh restart

Turn on password login

ChallengeResponseAuthentication yes
PasswordAuthentication yes
UsePAM yes
Restart ssh

Copy and pasting from remote vim

1. Edit /etc/ssh/ssh_config
Useful SSH Server Conf Tricks