Skip to content

Instantly share code, notes, and snippets.

View nacyot's full-sized avatar
🧶
The Science of Hitting

Daegwon Nacyot Kim nacyot

🧶
The Science of Hitting
View GitHub Profile
namespace :rails_best_practices do
desc "run rails best practices"
task :jenkins_plot_plugin => :environment do
OUTDIR = "./reports"
mkdir OUTDIR unless FileTest.exist? OUTDIR
OUTFILE = "#{OUTDIR}/rails_best_practices.properties"
Tempfile.open('rails_best_practices.XXXXXX', OUTDIR) do |file|
TMPFILE = file.path
@nacyot
nacyot / gscl
Last active December 18, 2015 01:29
BRANCH=`git rev-parse --abbrev-ref HEAD`
git commit --allow-empty -m "closes #${BRANCH}"
git checkout master
/*
* Ascii segment source to target
*
* @author nacyot
* @date 2013-07-18
* @version 0.01
*/
console.println("OmegaT Script Test.\n");
def count = 0
(require 'mouse)
(xterm-mouse-mode t)
(global-set-key [mouse-4] '(lambda () (interactive) (scroll-down 3)))
(global-set-key [mouse-5] '(lambda () (interactive) (scroll-up 3)))
(require 'mouse)
;; https://github.com/lincank/emacs-plugins/blob/master/common-settings/mwheel.el
;;(require 'mwheel)
(xterm-mouse-mode t)
;;(defun track-mouse (e))
(global-set-key [mouse-4] '(lambda () (interactive) (scroll-down 3)))
(global-set-key [mouse-5] '(lambda () (interactive) (scroll-up 3)))
# -*- coding: utf-8 -*-
# 기본적인 설정을 담당하는 부분
# Gem을 가져올 서버 명시
source 'https://rubygems.org'
# 사용하는 Ruby 버전 지정
ruby '2.0.0'
# 사용할 Gem 열거
@nacyot
nacyot / config
Created September 10, 2013 04:57
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = [email protected]:nacyot/vsns.git
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "upstream"]
url = [email protected]:dev-study/vsns.git
(add-hook 'ruby-mode-hook
'(lambda ()
(define-key ruby-mode-map (kbd "C-c c") 'rinari-find-controller)
(define-key ruby-mode-map (kbd "C-c m") 'rinari-find-model)
(define-key ruby-mode-map (kbd "C-c v") 'rinari-find-view)
(define-key ruby-mode-map (kbd "C-c e") 'rinari-find-environment)
(define-key ruby-mode-map (kbd "C-c i") 'rinari-find-migration)
(define-key ruby-mode-map (kbd "C-c j") 'rinari-find-javascript)
(define-key ruby-mode-map (kbd "C-c n") 'rinari-find-configuration)
(define-key ruby-mode-map (kbd "C-c v") 'rinari-find-view)

Visualization and Data Mapping

# -*- coding: utf-8 -*-
# http://synapsoft.co.kr/jsp/recruit/13_apply.html
# 엑셀 컬럼 글자 <-> 숫자 변환
class CellAddress
def self.to_num(text)
text.upcase.reverse.split("").map.with_index{ |item, i| (item.ord - 64) * 26 ** i }.reduce &:+
end
def self.to_text(num)