Skip to content

Instantly share code, notes, and snippets.

@rorlab
rorlab / .gitignore
Created April 1, 2016 10:48
[AGAIN2011] gitignore file for exluding sensitive data file
.vagrant/*
# development 환경
.rbenv-vars
# staging 환경
.rbenv-vars.staging
config/database.staging.yml
config/secrets.staging.yml
@rorlab
rorlab / git-create.sh
Created March 13, 2016 00:40
Shell script for making github repository and pushing source codes
#!/bin/sh
repo_name=$1
test -z $repo_name && echo "Repo name required." 1>&2 && exit 1
curl -u '[username]:[password]' https://api.github.com/user/repos -d "{\"name\":\"$repo_name\"}"
git init
git add .
git commit -m "initial commit"
git remote add origin "https://github.com/[username]/$repo_name.git"
git push -u origin master
@rorlab
rorlab / Vagrantfile
Last active October 26, 2016 11:23
Vagrantfile for Developing Rails Applications
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.network "forwarded_port", guest: 3000, host: 9000, auto_correct: true
config.vm.network "forwarded_port", guest: 80, host: 8080, auto_correct: true
# config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provider "virtualbox" do | vb |
# vb.name = "RORLAB DEV Vagrant"
@rorlab
rorlab / setup.sh
Last active December 14, 2017 08:10
Shell Provisioning Script used in Vagrantfile for Team-Developing Rails Applications
echo "Provision virtual machine..."
echo "Updating Packages"
sudo apt-get update > /dev/null 2>&1
echo "Installing Korean Language Pack"
sudo apt-get install language-pack-ko -y > /dev/null 2>&1
echo "Set TimeZone to Asia/Seoul"
sudo timedatectl set-timezone Asia/Seoul
@rorlab
rorlab / application.html.erb
Last active August 29, 2015 14:07
Application Layout File with Bootstrap "Clear Form"
<!DOCTYPE html>
<html>
<head>
<title>Blog</title>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
</head>
<body>
@rorlab
rorlab / application_helper.rb
Last active August 29, 2015 14:07
bootstrap alert helper method
module ApplicationHelper
def flash_class(level)
case level
when :notice then "info"
when :success then "success"
when :error then "danger"
when :alert then "warning"
# else "info"
end
@rorlab
rorlab / _form.html.erb
Created October 4, 2014 22:05
Simple_form scaffold erb template file for Bootstrap
<%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
<%%= f.error_notification %>
<%- attributes.each do |attribute| -%>
<div class="form-group">
<%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %>, input_html: { class: 'form-control' } %>
</div>
<%- end -%>
<div class="form-actions">
@rorlab
rorlab / ruby_on_rails_tutorial_rorlab_guide.md
Created July 5, 2014 05:20
Ruby on Rails Tutorial 공동번역 프로젝트 안내문

Ruby on Rails Tutorial 공동번역 프로젝트

주최자

  • ROR Lab.
  • 운영진 : 김대권/최효성

목적

  • Michael Hartl의 Ruby on Rails Tutorial을 한국어로 공동번역한다.
@rorlab
rorlab / google_translator_toolkit_guide.md
Last active August 29, 2015 14:03
구글 번역자 도구함 사용 가이드

구글 번역자 도구함 (Google Translator Toolkit)

번역자 도구함을 이용하여 할 수 있는 작업

  • MS 워드 문서, 오픈오피스, RTF, HTML, 일반텍스트, 위키피디아 글, 놀(knol) 문서를 업로드할 수 있다.

  • 이전의 사람이 번역한 것과 기계 번역을 이용하여 업로드한 문서를 "사전번역(pretranslate)"할 수 있다.

  • 이 도구함에서 제공하는 간단한 위지위크 에디터를 이용하면 사전번역을 효과적으로 할 수 있다.

@rorlab
rorlab / rorlab_translation_guide.md
Last active August 29, 2015 14:03
Michael Hartl의 Ruby on Rails Tutorial 공동번역

Ruby on Rails Tutorial 공동번역 프로젝트

주최자

  • ROR Lab.
  • 운영진 : 김대권/최효성

목적

  • Michael Hartl의 Ruby on Rails Tutorial을 한국어로 공동번역한다.