Blog 1

Random Talk on Random Thoughts

Octopress Codeblock Syntax

| Comments |

Problem

When I was writing the post The Daring Fireball Linked List, I included a sample Markdown source file for an Ocotpress post. I would like to have a monospaced font and a line number at the left of each line of the source file. In addition, I didn’t need any syntax highlighting for that file.

I looked at the official manual, and it’s said that “passing plain disables highlighting”.1 However, I got errors from Pygments!

127.0.0.1 - - [30/Aug/2014 21:36:51] "GET /images/noise.png?1408511469 HTTP/1.1"
 304 - 0.0010
      Regenerating: 1 files at 2014-08-30 21:38:38 ...done.
      Regenerating: 1 files at 2014-08-30 21:43:53   Liquid Exception: Pygments 
can't parse unknown language: plain. in _posts/2014-08-30-the-daring-fireball-li
nked-list.markdown/#excerpt
...error:
             Error: Pygments can't parse unknown language: plain.
             Error: Run jekyll build --trace for more information.
      Regenerating: 1 files at 2014-08-30 21:44:21   Liquid Exception: Pygments 
can't parse unknown language: plain. in _posts/2014-08-30-the-daring-fireball-li
nked-list.markdown/#excerpt
...error:
             Error: Pygments can't parse unknown language: plain.
             Error: Run jekyll build --trace for more information.
      Regenerating: 1 files at 2014-08-30 21:48:26 ...done.

Hotlinking: What Is It, and Why Is It Bad?

| Comments |

Why Hotlinking Is Theft
Even if You Have Permission to Use a Graphic

Each and every time someone looks at a webpage, their browser has to call up the image host and say, "send that image file over to me." It's like making a phone call.

...Multiply that by hours, days, and months, and then multiply that by the number of graphics on a clipart site. You can see why hotlinking puts a substantial load on an image host. That load is bandwidth, and someone has to pay for it.

Greekgeek

Luckily, I usually download the images and write down their sources if I use resources from other hosts. However, I did hotlinked to the CC-BY-SA icon since I just copied the code from Creative Commons.1

Now, I’ve got rid of those hotlinked figures.


  1. The HTML code for embedding the Creative Commons license. 

The Daring Fireball Linked List

| Comments |

The Daring Fireball Linked List

Paczkowski: Apple Wearable Won't Ship Until Next Year 

John Paczkowski:

So that new wearable device Apple is introducing on September 9? It's going to be a while before anyone is actually wearing it. Sources in position to know tell me it won't arrive at market for a few months. "It's not shipping anytime soon," said one. So when does Apple plan to ship its eagerly anticipated wearable? That's not clear, but my understanding is that we're unlikely to see it at retail until after the holiday season—think early 2015.

If true, why? I'm guessing something similar to why they pre-announced the original iPhone—otherwise it would leak through regulatory filings with various governments around the world. Plus, they have no worries about the Osborne Effect with a new product category.

...
About the Linked List

The Daring Fireball Linked List is a daily list of interesting links and brief commentary, updated frequently but not frenetically. Call it a "link log", or "linkblog", or just "a good way to dick around on the Internet for a few minutes a day".

Daring Fireball

Since I like the clarity of the linked list format, I’d been looking for ways to do this in June, but I couldn’t understand them. Moreover, as can be seen from the size of git diff octopress/linklog1, the difference between linklog and master branches is very large. I couldn’t understand the git-diff result for source/javascripts/octopress.js. This would discourage any ordinary users from looking into the issue. Therefore, I once said that I didn’t know how to write an Octopress linklog.2

Last night, I added an unofficial linklog feature to Octopress.3 The official guide didn’t worked for me.4 I could see the complaints from some users who had found that this feature wasn’t working.5 At the same time, I could see some blogs that included this feature.6 The last commit of the linklog branch was in 2012.7 It seems that it isn’t likely that Octopress will work on this in the next few months.8

Clang Complete on Ubuntu 14.04

| Comments |

Problem

Last night, when I tried to write a new file hello.cpp, I got the following problem.

"hello.cpp" 8L, 105C
Loading libclang failed, completion won't be available. Are you sure '/usr/lib/'
 contains libclang?
/usr/lib//libclang.so: cannot open shared object file: No such file or direc
tory. To provide a path to libclang use Config.set_library_path() or Config.set_
library_file().

Press ENTER or type command to continue

My Problems in M$ and Ubuntu

| Comments |

I seldom encounter problems in both operating systems. However, there’re exceptional situations.

M$ Win* 7

I once booted into its “safe mode”, and experienced some problems during an image upload. I don’t wish to learn more about the problem.

MS problem

Ubuntu 14.04

Last night, I saw a small dialog box after the login.

Ubuntu problem

I checked the details—it was the problem of Ubuntu’s greeter, but I’m going to do nothing to resolve it.

I think that this is due to my method of getting the newer version of Ubuntu—upgrading instead of clearing and installing.1

Since I lack time to study the official manual and related posts about clearing Linux partitions and installing Ubuntu 14.04, I just keep using the Ubuntu that I have.

Conclusion

I’m not going to argue whether GNU/Linux is better than M$ Win*. There’s already lots of posts on that issue.

I just want to say that problems can exist in any OS. If you don’t intentionally break things and your machine still goes wrong, then “keep calm and carry on”. However, if it’s free software and you have the patience and ability to browse its source code, you may see what’s wrong.

It’s great to learn what’s really going on in an OS, and I personally think that the GNU/Linux commands are better tools for that, when compared to their GUI counterparts.


  1. Tam, V. (Aug 13, 2014). Upgraded Ubuntu. Retrieved from https://vincenttam.github.io/blog/2014/08/13/upgraded-ubuntu/ 

Updated Octopress Source Code

| Comments |

Background

  1. Upgraded to Ubuntu 14.04 LTS1
  2. Installed Ruby 2.1.2.2
  3. Tried to generate the blog from the same Markdown and HTML source, but failed.3

During the merge of Octopress source code last week, there’re some conflicts between my old working source code and the new one fetched from Octopress’s Github repository. When rake complained, I changed my original code bit by bit—this turned out to be a failed and inefficient approach. Not familiar with Ruby, I gave up the whole idea of updating Octopress’s source code and generating the contents on top of a new version of Ruby. In order to keep posting things to this blog, I kept using old things on this new Ubuntu release.

Ubuntu 14.04 Monospaced Font Family

| Comments |

Background

Last Wednesday, I upgraded Ubuntu from 12.04 LTS to 14.04 LTS.1

Problem

As we can see from the second figure in the post in footnote 1, in Chromium, the font used for displaying the source code of a website is not monospaced.

HTML source code viewed in Chromium

Removed Ubuntu Tweak

| Comments |

Tonight, I uninstalled Ubuntu Tweak for security reasons.1

[owner@localhost ~]$ sudo apt-get remove ubuntu-tweak 
[sudo] password for owner: 
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
ubuntu-tweak
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 4,034 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 354631 files and directories currently installed.)
Removing ubuntu-tweak (0.8.7-1~precise1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for mime-support (3.54ubuntu1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for libglib2.0-0:i386 (2.40.0-2) ...
Processing triggers for gconf2 (3.2.6-0ubuntu2) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...

  1. See Avoid 10 fatal mistakes in Ubuntu and Linux Mint in Easy Linux tips project.