Skip to content

Instantly share code, notes, and snippets.

@maxivak
maxivak / webpacker_rails.md
Last active June 15, 2024 21:37
Webpack, Yarn, Npm in Rails
@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
@wilon
wilon / vim-surround使用指南.MD
Last active May 30, 2024 14:15
vim-surround使用指南,vim-surround如何使用

普通模式

命令 说明 + 示例
ds 删除括号
ds " "Hello world!" =>
Hello world!
cs 替换括号
cs "( "Hello world!" =>
(Hello world!)
cS 替换括号,括号内文本做新一行
cS "{ "Hello world!" => {     Hello world! }
@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
@hechien
hechien / Capistrano 3.md
Last active August 29, 2015 14:26 — forked from stevenyap/Capistrano 3.md
Capistrano 3 Setup

This guide explains the way to setup a production server using Capistrano.

Setup Capistrano on LOCAL

  • Capistrano is a development gem which assist the developer to run commands on the production server (something like a Heroku toolbelt)
  • Hence, it is installed and configured on developer's computer
# Gemfile

# Use Capistrano for deployment
@hechien
hechien / .zshrc
Created July 10, 2015 08:03
rails / git / capistrano zsh alias
alias rg="rails g"
alias rs="rails s"
alias rc="rails c"
alias rd="rails d"
alias brg="bin/rails g"
alias brs="bin/rails s"
alias brc="bin/rails c"
alias brd="bin/rails d"
alias gcd='git checkout develop'
@biscuitvile
biscuitvile / up_an_running.md
Last active July 8, 2020 07:15
Up and Running with iTerm, Tmux, Vim, and vim-rails

Up and Running with iTerm, Tmux, Vim, and vim-rails

Make it a point to be able to use the keyboard as much as you can. In OS X the spotlight is great for this. By default the spotlight hotkey is Cmd+Space. Make it a point to try and always use iTerm in fullscreen. Remember that your tmux prefix is set to Ctrl+z

  • Open iTerm with spotlight with Cmd+Space search iTerm and open with Enter
  • Fullscreen iTerm with Cmd+Enter
  • Pop out of iTerm with the hotkey you added Ctrl+Enter
  • Pop back into iTerm with Ctrl+Enter again
  • Nagivate to your intended project directory
  • Check for running tmux sessions with tmux ls (Failed to connect to server just means no tmux sessions yet)

專案名稱: Rails新手村網站

主旨:收集 Rails 有用 Link

基本功能

@deepak
deepak / Dockerfile
Last active March 6, 2020 06:01
Dockerfile for installing ruby using rbenv
# DOCKER-VERSION 0.4.8
# am facing issue
# https://github.com/dotcloud/docker/issues/1123
FROM ubuntu:12.04
MAINTAINER Deepak Kannan "deepak@codemancers.com"
RUN apt-get -y install python-software-properties

開 Project 流程

使用 Bootstrappers 產生 project

bootstrappers demo
cd demo
git init
git add .
git commit -m "init project"