Skip to content

Instantly share code, notes, and snippets.

View ksmxxxxxx's full-sized avatar
🏠
Working from home

ksmxxxxxx ksmxxxxxx

🏠
Working from home
View GitHub Profile
#frozen_string_literal: true
heredoc_01 = <<~TEXT
. dummy_file_001.txt lorem_ipsum_10p.txt
.. dummy_file_002.txt lorem_ipsum_1p.txt
0123456789_0123456789_0123.md dummy_file_003.txt lorem_ipsum_2p.txt
0123456789_0123456789_0123456789_0123456789_012345.md dummy_file_004.txt lorem_ipsum_5p.txt
dir_foobar dummy_file_005.txt symlink_file.txt
TEXT
@ksmxxxxxx
ksmxxxxxx / convert_rgb.rb
Last active August 16, 2020 09:04
🍒本 4章の例題
def to_hex(r, g, b)
[r, g, b].inject('#') do |hex, n|
hex + n.to_s(16).rjust(2, '0')
end
end
def to_ints(hex)
r, g, b = hex[1..2], hex[3..4], hex[5..6]
[r, g, b].map(&:hex)
end
@ksmxxxxxx
ksmxxxxxx / dein.toml
Created June 25, 2020 16:05
Vimのプラグイン
[[plugins]]
repo = 'Shougo/dein.vim'
[[plugins]]
repo = 'Shougo/vimproc.vim'
build = 'make'
[[plugins]]
repo = 'Shougo/neomru.vim'
on_path = '.*'