Skip to content

Instantly share code, notes, and snippets.

@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'
@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
@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
@wilon
wilon / vim-surround使用指南.MD
Last active March 11, 2025 04:30
vim-surround使用指南,vim-surround如何使用

普通模式

命令 说明 + 示例
ds 删除括号
ds " "Hello world!" =>
Hello world!
cs 替换括号
cs "( "Hello world!" =>
(Hello world!)
cS 替换括号,括号内文本做新一行
cS "{ "Hello world!" => {     Hello world! }
@andyyou
andyyou / rails_webpacker_bootstrap_expose_jquery.md
Last active November 14, 2025 00:54
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
@maxivak
maxivak / webpacker_rails.md
Last active November 3, 2024 21:38
Webpack, Yarn, Npm in Rails