Last active
August 29, 2015 13:56
-
-
Save yuya-takeyama/9043945 to your computer and use it in GitHub Desktop.
集中
This file contains 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
# 集中したいときに実行するやつ | |
BASEDIR = 'C:\WINDOWS\system32\drivers\etc' | |
open File.join(BASEDIR, 'hosts'), 'w' do |hosts| | |
hosts.puts(open(File.join(BASEDIR, 'hosts.template')).read) | |
hosts.puts(open(File.join(BASEDIR, 'hosts.template_to_focus')).read) | |
end |
This file contains 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
# 元々の hosts ファイルをこの名前で保存しておく |
This file contains 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
127.0.0.1 b.hatena.ne.jp | |
127.0.0.1 www.facebook.com | |
127.0.0.1 github.com | |
127.0.0.1 twitter.com | |
127.0.0.1 blog.yuyat.jp |
This file contains 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
# 集中しなくてもいいときに実行するやつ | |
BASEDIR = 'C:\WINDOWS\system32\drivers\etc' | |
open File.join(BASEDIR, 'hosts'), 'w' do |hosts| | |
hosts.puts(open(File.join(BASEDIR, 'hosts.template')).read) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment