Skip to content

Instantly share code, notes, and snippets.

View patoui's full-sized avatar
😃
Trying to write code my future self will be proud of

Patrique Ouimet patoui

😃
Trying to write code my future self will be proud of
View GitHub Profile
@patoui
patoui / ruby-on-rails-exploration-part-1.md
Created November 25, 2018 19:30
ruby-on-rails-exploration-part-1

Introduction

This is an overview of things I've learnt while working on my side project anonforum in Ruby on Rails.

Today's topics:

  • Testing (models and controllers)
  • Routing
  • Controllers
  • Views (helpers)
@patoui
patoui / setting-up-webpack-in-ruby-on-rails.md
Last active November 21, 2018 12:43
Setting Up Webpack in Ruby on Rails

Introduction

This is a simple introduction on how I setup Webpack in Ruby on Rails. I hope it'll be useful to others who wanted to use Webpack within a Rails application like I did.

Caveats

This article assumes you've already setup a rails project via rails new {project-name}

Setting Up Sprockets

## Introduction
This is a guide on how to get setup with Windows Subsystem for Linux (Ubuntu) for Laravel Development (LEMP). Which gives you the flexibility of the Linux terminal and the application compatibility of Windows.
Recently I decided to switch from Ubuntu 16.04 to Windows 10 Pro as I wanted access to applications that are not available on Linux based operating systems (i.e. Microsoft Office 2016, Adobe Suite). I know there are plenty of alternatives (or things like Play on Linux, Lutris, Crossover), but I wanted to tests on what my customers are using and I got tired of using virtual machines.
All that to say that I’ve got Ubuntu application (Windows Subsystem for Linux) working on Windows 10 Pro, so I didn’t lose any of the power of the Linux terminal but gained all the application compatibility of the Windows 10 operating system.
### Caveats
I’m using the Insider Program builds so my current system looks like:
## LEMP Stack
First we'll need to install the backend essentials: Nginx, MySQL, PHP (with FPM).
### Nginx
```
sudo apt-get update
sudo apt-get install nginx
```
Find/Replace strip Laravel config for value only
FIND: ^.*=> '(.*)',
REPLACE: $1