Skip to content

Instantly share code, notes, and snippets.

def print_maze(width, height, hori_walls, vert_walls)
puts ' ' + '-' * (width * 2 - 1)
(height - 1).times do |y|
print '|'
(width - 1).times do |x|
print ' '
print hori_walls[y][x] ? '|' : ' '
end
puts ' |'
class String
def to_s
'String'
end
end
class Fixnum
def to_s
'Fixnum'
end
@yous
yous / Custom.ini
Last active January 5, 2016 10:43
MacType
[General]
Name=Custom
Icon=..\mactray.exe.ico,0
;【自动挂钩子进程】
;[0:Disable] 1:Enable
HookChildProcesses=1
;【字体微调】
;0:Normal 1:NoHinting 2:AutoHinting 3:Light+AutoHinting
y=gets.to_i;puts (1..12).select{|m|Time.new(y,m).wday<1}
@yous
yous / normalize.rb
Created February 6, 2015 10:55
Normalize file name in Windows
require 'unicode'
Dir.glob('*') do |f|
normalized_f = Unicode::normalize_C(f)
if f != normalized_f
puts "Renaming #{f} to #{normalized_f}"
File.rename(f, normalized_f)
end
end

BaseHangul

BaseHangul은 한글을 이용한 바이너리 인코딩입니다. 바이너리 데이터를 KS C 5601 규격에 포함된 한글 문자로 변환합니다.

변환 방식

5바이트(40비트)가 4글자가 됩니다.

왜 40비트인가?

@yous
yous / keybase.md
Last active August 29, 2015 14:04

Keybase proof

I hereby claim:

  • I am yous on github.
  • I am yous (https://keybase.io/yous) on keybase.
  • I have a public key whose fingerprint is 1BF1 AFE8 682E 45A2 11FF 2C0E 891B 7A9E 1D5A 400A

To claim this, I am signing this object:

@yous
yous / _syntax.scss.diff
Created January 17, 2014 14:17
Fix embedded gist style
@@ -1,10 +1,10 @@
.highlight, html .gist .gist-file .gist-syntax .gist-highlight {
- table td.code { width: 100%; }
+ table td.code, td.line-data { width: 100%; }
border: 1px solid $pre-border !important;
}
.highlight .line-numbers, html .gist .gist-file .gist-syntax .highlight .line_numbers {
text-align: right;
- font-size: 13px;
+ font-size: 13px !important;
@yous
yous / _style.scss.diff
Created December 4, 2013 20:47
Remove styles overriding background and hiding gutter a1218858d48ee5701c288e889e5ac43aa875ffd2
@@ -166,20 +166,6 @@ article {
}
-figure.code {
- .highlight {
- background: #212C3B !important;
-
- .gutter {
- display: none;