Skip to content

Instantly share code, notes, and snippets.

@oojikoo-gist
oojikoo-gist / install_postgis_osx.sh
Created July 28, 2015 06:32
mac: install_postgis_osx
# 현재 가장 잘 동작하는 버전인듯
# postgres는 설치했다고 가정하자.
# Some good references are:
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392
# 환경변수에 LC_COLLATE=C 이거 있는지 확인
@oojikoo-gist
oojikoo-gist / rails: devise_strong_params
Last active September 3, 2015 05:47
rails: devise_strong_params
def user_params
+ accessible = [ :name, :email ] # extend with your own params
+ accessible << [ :password, :password_confirmation ] unless params[:user][:password].blank?
+ params.require(:user).permit(accessible)
+ end
@oojikoo-gist
oojikoo-gist / rails: request.env
Created September 3, 2015 12:30
rails: request.env
#Rails Request.env Variables
SERVER_NAME
PATH_INFO
REMOTE_HOST
HTTP_ACCEPT_ENCODING
HTTP_USER_AGENT
SERVER_PROTOCOL
HTTP_CACHE_CONTROL
HTTP_ACCEPT_LANGUAGE
HTTP_HOST
@oojikoo-gist
oojikoo-gist / rails_model_cheatsheet.md
Created September 11, 2015 03:59
rails: model cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

@oojikoo-gist
oojikoo-gist / ansible_start.md
Created September 11, 2015 04:04
ansible: getting started with Ansible
@oojikoo-gist
oojikoo-gist / mina.md
Created September 11, 2015 07:21
rails: mina

(these are merely ideas, not a concrete plan on where Mina is headed from now!)

State of affairs

There are many tools available for app deployment, but they can all use some form of improvement.

  • Capistrano is flexible, but slow, and takes too much effort to customize.
  • Cap and Mina can work with any language, but the Capfiles and deploy.rb's
@oojikoo-gist
oojikoo-gist / timewriter.md
Created September 11, 2015 07:22
workflow: timewriter

timewriter

Minimal time logs tracker. Runs on Node.js. Features:

  • Friction-free time logging. Just type t shopping in the grocery to start a task.

  • Everything in the terminal. It's a Node.js command-line app that runs anywhere Node can. (even Windows!)

@oojikoo-gist
oojikoo-gist / database.yml.mysql2
Created September 14, 2015 14:35
rails: database.yml msql2
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
@oojikoo-gist
oojikoo-gist / database.yml.mysql2
Created September 14, 2015 14:36
rails: db mysql2
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8