Skip to content

Instantly share code, notes, and snippets.

@dyanagi
dyanagi / bulma_form_builder.rb
Last active April 13, 2020 11:53
The Rails form builder for Bulma
# config/initializers/bulma_form_builder.rb
# There are a few things to mention:
# 1) See the article at the URL for sample code with screenshots and more information.
# URL: https://medium.com/@dyanagi/a-bulma-form-builder-for-ruby-on-rails-applications-aef780808bab
# 2) This may not have covered all form controls.
# Form builder for Bulma
# Reference: https://bulma.io/documentation/form/
class BulmaFormBuilder < ActionView::Helpers::FormBuilder
@erdostom
erdostom / Dockerfile
Last active December 26, 2024 08:25
Good starter Dockerfile + docker-compose.yml for Rails 6.
FROM ruby:2.6.5-alpine
RUN apk add --update --no-cache bash build-base nodejs sqlite-dev tzdata postgresql-dev yarn
RUN gem install bundler:2.1.4
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn install --check-files
@AtulKsol
AtulKsol / postgres-not-running-fix.md
Last active December 22, 2022 05:10
Postgres on OSX with homebrew not running

Postgres on OSX with homebrew not running [tested in mac]

Fix for following issue:

$ psql
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
@andyyou
andyyou / rails_webpacker_bootstrap_expose_jquery.md
Last active August 9, 2022 07:38
Rails 5.2 with webpacker, bootstrap, stimulus starter

Rails 5.2 with webpacker, bootstrap, stimulus starter

This gist will collects all issues we solved with Rails 5.2 and Webpacker

Create Project

# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
@satendra02
satendra02 / app.DockerFile
Last active November 19, 2024 17:28
docker+rails+puma+nginx+postgres (Production ready)
FROM ruby:2.3.1
# Install dependencies
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Set an environment variable where the Rails app is installed to inside of Docker image:
ENV RAILS_ROOT /var/www/app_name
RUN mkdir -p $RAILS_ROOT
# Set working directory, where the commands will be ran:
@anhphamt
anhphamt / successful-rails-nginx-production-deployment.txt
Created January 30, 2018 04:49 — forked from dhirajbajaj/successful-rails-nginx-production-deployment.txt
Ruby on Rails / Postgres / Nginx / Passenger / Capistrano / Ubuntu 14.04 / AWS
#####################################
# 0. SET UP AWS (ASSUMING YOU HAVE ALREADY SET UP AN ACCOUNT)
# CREATE SECURITY GROUP
• In the EC2 Dashboard, click Security Groups, then Create Security Group.
• Enter Name
• Enter Description
• Rules to add:
- HTTP
- SSH
@zentetsukenz
zentetsukenz / ruby_on_rails_deployment.md
Last active December 2, 2024 01:26
Deploy Ruby on Rails application with Docker Compose and Capistrano with ease

Docker

Files and Folders.

|
|\_ app
|...
|\_ docker
| |
@davidderus
davidderus / .dockerignore
Last active March 3, 2024 10:15
Docker + Rails + Puma + Postgres + Nginx
.git
.gitignore
/doc
.yardoc
coverage
jsdoc
/tmp
/log
Dockerfile
Dockerfile.prod
@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active January 31, 2025 11:20
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key