Problem
This Thursday, I wanted to browse Evsseny’s article about setting up a Jekyll site using Jekyll-Bootstrap on a GitHub project page.1 Unluckily, this site had been blocked for the administrator.
How can I view the contents of the page?
Solution
Use Google’s web cache.
-
Search “http://www.your-blocked-site.com/path/to/your/page” on Google.
-
Click the down arrow next to the URL.
-
Click the first item in the pop-up menu.
Finally, I could read the contents of the post.
Lessons learnt
- Define new variables in shell scripts.
- Use
s/foo/bar/
insed
for manipulating the name of the output files.
The screenshots were intially under the home folder ~
and their
names were like temp_foo.png
or temp_bar.png
so that they would
stay close to each other in Nautilus. However, when I included
these PNG files under the directory
~/octopress/source/images/flalign_spacing
for uploading them to this
blog, I wouldn’t like to keep temp_
because they’re already in a
separate folder. Therefore, I wrote a script to do this.
Since mv
can overwrite files and commands can be wrongly typed, I
used cp
instead of mv
so that the original files wouldn’t
disappear even though something went wrong. If everything proceeds
smoothly, then the old files in the home folder can then be safely
deleted.
1 2 3 4 5 6 |
|
If I use single quotes to surround the destination (e.g.
'~/.../$newf'
), the syntax highlighting for $newf
will be gone
in Vim. Therefore, I used double quotes ""
instead, but I then
received errors similar to the one below from cp
.
cp: cannot create regular file `/home/octopress/source/images/posts/UseGooCache/
blocked300.png': No such file or directory
-
在github的Project Pages上部署jekyll
The original link http://evsseny.appspot.com/?p=63001 is dead now. ↩