Skip to content

Instantly share code, notes, and snippets.

View usutani's full-sized avatar

Yasuhiro Usutani usutani

  • Kobe, Hyogo, Japan
View GitHub Profile

How to deploy a Rails 7.1 app with Postgres and Kamal on a single server

I think you have looked at the tutorial from Mr. Heinemeier Hansson at least once or twice and have a similar setup.

rails new kamal_pg --css tailwind --skip-test --database=postgresql

cd kamal_pg
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
# config/routes.rb
resources :documents do
scope module: 'documents' do
resources :versions do
post :restore, on: :member
end
resource :lock
end
end
@Daij-Djan
Daij-Djan / UIFont+Traits.h
Last active May 14, 2016 07:00 — forked from anonymous/UIFont+Traits.mm
Easy UIFont Traits Querying (isBold/ isItalic) Found this hidden gem and made it a gist: http://joshua.nozzi.name/2012/08/easy-uifont-bold-and-italic-querying-with/ - and copyng of fonts to add specific traits
#import <UIKit/UIKit.h>
#import <CoreText/CTFont.h>
@interface UIFont (Traits)
@property(nonatomic, readonly) CTFontRef CTFontRef;
@property(nonatomic, readonly) CTFontSymbolicTraits traits;
@property(nonatomic, readonly, getter=isBold) BOOL bold;
@property(nonatomic, readonly, getter=isItalic) BOOL italic;
@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
@ryanb
ryanb / rails_3_1_rc4_changes.md
Created May 6, 2011 01:10
The Changelogs for Rails 3.1 Beta 1

Railties 3.1 RC4

  • The new rake task assets:clean removes precompiled assets. [fxn]

  • Application and plugin generation run bundle install unless --skip-gemfile or --skip-bundle. [fxn]

  • Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]

  • Template generation for jdbcpostgresql #jruby [Vishnu Atrai]

@mr-rock
mr-rock / Gitosis on Snow Leopard Server
Created December 27, 2009 15:53
This is the steps I followed in order to install Gitosis on my Snow Leopard Server.
These are the things I did in order to have Gitosis installed and working on my Snow Leopard Server:
1. Install Git.
I use the installer for OS X provided by Google Code (http://git-osx-installer.googlecode.com/files/git-1.6.5.7-intel-leopard.dmg).
2. Install Gitosis
I got the Gitosis from the eagain.net server and I installed using Python bundled with Snow Leopard.
$ git clone git://eagain.net/gitosis.git
$ cd gitosis && python setup.py install