Skip to content

Instantly share code, notes, and snippets.

View bazzel's full-sized avatar

Patrick Baselier bazzel

  • Oisterwijk, The Netherlands
View GitHub Profile
@bazzel
bazzel / README.md
Last active January 4, 2022 12:18
Connect local Rails to a Postgres in Docker

Connect local Rails to a Postgres in Docker

(reference)

  1. Install Docker:
brew install docker # or brew install homebrew/cask/docker
  1. Start PG in a container:
# config/initializers/carrier_wave.rb
CarrierWave.configure do |config|
  storage =
    case Rails.env
    when 'staging', 'production'
      :fog
    else
      :file
    end
@bazzel
bazzel / README.md
Last active December 6, 2019 07:38
Simply create Material-like forms in Rails with Simple Form

Heroku

Create multiple environments:

$ heroku create --remote [env]

# example
$ heroku create --remote staging
@bazzel
bazzel / README.md
Last active December 13, 2019 16:06
Rails 6 and Daemonite's Material UI

Daemonite's Material UI is a cross-platform and fully responsive front-end interface based on Google Material Design developed using Bootstrap 4. This gist describes how to integrate this into a Rails 6 application.

First setup Bootstrap 4 as descrided in this gist.

$ yarn add daemonite-material
@bazzel
bazzel / README.md
Last active May 26, 2021 04:20
Rails 6 and Bootstrap 4

This blogpost shows how to setup Rails 6 with Bootstrap 4.

This snippet shows a somehow different and less customized approach.

$ rails new rails6-bootstrap4
$ bundle --binstubs
$ yarn add bootstrap jquery popper.js expose-loader
@bazzel
bazzel / README.md
Last active December 27, 2018 13:21
Ruby on Rails - Material Design
@bazzel
bazzel / README.md
Last active July 27, 2024 16:48
Webpacker and I18n
$ rails new my-i8n --webpack

Gemfile

gem 'i18n-js'
@bazzel
bazzel / html-ipsum.html
Last active November 23, 2015 07:32
myHTML-Ipsum
<!-- Sample Content to Plugin to Template -->
<h1 id='wrapper'>CSS Basic Elements</h1>
<p>The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.</p>
<hr />
<h1 id="headings">Headings</h1>
<h1>Heading 1</h1>
{{#each starred}}
<span class="glyphicon glyphicon-star"></span>
{{/each}}
{{#each unstarred}}
<span class="glyphicon glyphicon-star-empty"></span>
{{/each}}