Skip to content

Instantly share code, notes, and snippets.

View odd-poet's full-sized avatar

Yunsang Choe odd-poet

View GitHub Profile
@odd-poet
odd-poet / gist:1776598
Created February 9, 2012 02:28
deprecated : (in refactory ruby ed.)
class Module
def deprecate(methodName, &block)
module_eval <<-END
alias_method :deprecated_#{methodName}, :#{methodName}
def #{methodName}(*args, &block)
$stderr.puts "Warning: calling deprecated method #{self}.#{methodName}."
deprecated_#{methodName}(*args, &block)
end
END
end
@odd-poet
odd-poet / svn2git.sh
Created July 22, 2012 06:27
조낸 심플한 svn2git script.
#!/bin/bash
# simple svn2git script.
# author : yunsang.choi (oddpoet@gmail.com)
#
# It checkouts svn repository to local git repository
# include branches and tags.
#=====================================
svn2git() {
local url=$1
@odd-poet
odd-poet / gw2ssh-install.sh
Last active December 16, 2015 10:18
SKP용 GW스크립트
#!/bin/bash
gw2ssh_url="https://gist.github.com/odd-poet/5418622/raw/gw2ssh.sh"
filepath=$HOME/gw2ssh.sh
profile=$HOME/.bash_profile
echo "Download gw2ssh.sh script..."
curl -s $gw2ssh_url > $filepath
echo " done. "
@odd-poet
odd-poet / README.md
Last active December 18, 2015 02:29
gw2ssh for zsh(oh-my-zsh)

gw2ssh for zsh

oh-my-zsh 플러그인으로 만들어진 zsh용 gw2ssh

설치방법

curl https://gist.github.com/odd-poet/5711863/raw/install.sh | sh 
@odd-poet
odd-poet / blinks-rvm.zsh-theme
Created December 3, 2013 16:58
zsh 테마 (rvm-prompt 포함)
@odd-poet
odd-poet / _service.md
Last active August 29, 2015 14:01 — forked from naholyr/_service.md

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
/**
* This file is licensed to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@odd-poet
odd-poet / convertImgToBase64.js
Created October 16, 2014 14:13
convertImgToBase64
// 출처 : http://stackoverflow.com/questions/6150289/how-to-convert-image-into-base64-string-using-javascript
/**
* Convert an image
* to a base64 string
* @param {String} url
* @param {Function} callback
* @param {String} [outputFormat=image/png]
*/
function convertImgToBase64(url, callback, outputFormat){
var canvas = document.createElement('CANVAS'),
@odd-poet
odd-poet / .tmux.conf
Last active October 3, 2020 07:30
tmux 설정.
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
set-window-option -g pane-base-index 1
#set -g default-terminal screen-256color