Code to use in ruby
filename = "/path-to/file/file.ext"
text=''
File.open(filename,"r"){ |f| f.gets; text=f.read}
File.open(filename,"w+"){ |f| f.write(text)}
Make sure that variable "filename" should be in lowercaseIf you want a variable in uppercase then you have to declare it outside the def/method.
Set default index.html page in NGINX
-
Recently I setup Jekyll-Blog on nginx server which is pure html code. When
I tried to call url without index.html (http://domain.com/blog/) in path,
it wa...
8 years ago