Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / ansible_start.md
Created September 11, 2015 04:04
ansible: getting started with Ansible
@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 / 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: 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 / 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 / install_postgis_ubuntu.sh
Created July 28, 2015 06:31
ubuntu: install_postgis
# 나는 이녀석을 참고했다.
# http://linfiniti.com/2012/05/installing-postgis-2-0-on-ubuntu/
#
# 환경변수에 LC_COLLATE=C 이거 있는지 확인
#1. Install PostgreSQL postgis and postgres
sudo dpkg --purge postgis postgresql-9.1-postgis
sudo apt-get install python-software-properties
@oojikoo-gist
oojikoo-gist / css_dictionary.css
Created April 24, 2015 16:19
rails: css_dictionary.css
// CSS dictionary
// <a href="#" rel="friend nofollow">Larry</a>
li a[rel~='friend'] {
font-weight: bold;
}
// target only #upperSection, #lowerSection
// <div id="upperSection">
// <p>Lorem ipsum dolor sit amet...</p>