This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
import re | |
r = re.compile('((\d)\\2*)') | |
s = '1' | |
print s | |
for _ in range(50): | |
s = ''.join([''.join([str(len(m[0])), m[0][0]]) for m in r.findall(s)]) | |
print s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Bean | |
MENUS = [25, 50, 99, 210, 310, 170, 270, 590, 430, 620, 360, 450, | |
420, 320, 677, 308, 210, 536, 364, 466, 675, 572, 820, 959, 861, | |
1060, 1200, 260, 483].sort | |
attr_accessor :remain, :menus | |
def initialize(num) | |
if num.is_a?(Bean) | |
@remain = num.remain |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ์๋ ์ฝ๋๋ฅผ ๋ณต์ฌํด ๋ถ๋งํฌ์ ๋ฑ๋กํ์ธ์ | |
// ๋ถ๋งํฌ์ ์ ๋ชฉ์ ์ ๋นํ ์ ํ์๊ณ ์๋ ์ฝ๋๋ ์ฃผ์ ๋ถ๋ถ์ ๋ถ์ฌ ๋ฃ์ผ์๊ธฐ ๋ฐ๋๋๋ค. | |
javascript:(function() {var d=document;var s=d.createElement('script');s.setAttribute('src','https://raw.github.com/gist/3203853/clean-me2day-wiki.js');d.getElementsByTagName('head')[0].appendChild(s);})() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
์ฌํ๋ฆฌ 6์์ ๊ธฐ๋ณธ ํฐํธ ์ค์ ์ด ์์ด์ง. ๋์ Preferences > Advanced > Style sheet ์ต์ ์ | |
ํตํด CSS๋ฅผ ์ง์ ํ์ฌ ๊ธฐ๋ณธ ํฐํธ๋ฅผ ์ง์ ํ ์ ์์. ๋ค์์ ๊ธฐ๋ณธ ํฐํธ๋ฅผ ๋ค์ ๋๋๊ณ ๋(OTF)๋ก ์ง์ ํ๊ณ | |
์ ๋ฐ์ ์ผ๋ก ์ฌ์ฉ๋๋ ํฐํธ๋ช ์ ๋ํด alias ์ค์ ํ๋ค. | |
*/ | |
/* ๊ธฐ๋ณธ ํฐํธ๋ฅผ ๋๋๊ณ ๋์ผ๋ก ์ง์ */ | |
body { font-family: NanumGothicOTF; } | |
/* Font alias ์ค์ */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:window.open("<๋ฏธ๋์ฑํ ์ฃผ์>", "", "width=300,height=400,toolbar=0,menubar=0,scrollbars=1"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
๊ณต์ฉ API ์๋ต ํ์ | |
----------------- | |
* metadata๋ฅผ ์ํ ๋ณ๋ ํ๋๋ ์ ํ์ง ์์ | |
* result๋ ๋ฐ๋์ ํด์ | |
* 'status' ๊ฐ ์๋ฌ์ธ ๊ฒฝ์ฐ ๋ ์์ธํ ์๋ฌ ์ ๋ณด๋ 'result' ํ๋์ ์ง์ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
page = new WebPage() | |
url = 'http://search.naver.com/search.naver?where=nexearch&query=tv%ED%8E%B8%EC%84%B1%ED%91%9C&x=0&y=0&sm=top_sug.pre&fbm=0&acr=1&acq=TV&qdt=0&ie=utf8' | |
page.open url, (status) -> | |
if (status != "success") | |
console.log "invalid response: #{status}" | |
phantom.exit() | |
page.clipRect = { top: 340, left: 180, width: 590, height: 400 } | |
page.render('tv.png') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PS1="\[\033[34m\]\w\[\033[35m\]\`ruby -e \"print (%x{git branch 2> /dev/null}.split(/\n/).grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1)')\"\`\[\033[00m\]> " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["super+ctrl+left"], "command": "next_view_in_stack" }, | |
{ "keys": ["super+ctrl+right"], "command": "prev_view_in_stack" } | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Original | |
def hello | |
puts "Original" | |
end | |
end | |
module FeatureA | |
def self.included(base) | |
base.class_eval do | |
alias_method_chain :hello, :feature_a |