A Hu Qiang Blog

I am Qiang, I am strong.

Mount Entire DD Image

This is a linux logoYesterday, my Raspberry Pi running Arch Linux was not able to boot with error: Kernel Panic, not syncing: no init found. I spent a night on it, but could not find a working solution. The last option is easy: reinstall the system. That is really the last resort, for I do not want to re-setup everything I have done: samba server, Time Machine server, Xunlei Offline Downloader…

Unable to mount the SD card

The system does not boot, so I need to find a way to get into the file system to identify what is wrong, or at least backup all the configuration files.

My Printer Friendly CSS

I do want my webpages printed out nicely, especially my Resume, which should not contain the unnecessary elements, e.g. site title, side bar, comments… According to w3schools.com, CSS Media Type can help me achieve the goal by providing different sets of CSS for various outputs. Below is the CSS I have written, you can copy and save it if you want.

Fix Invalid URL to Google Calendar in Mountain Lion

If you are much annoyed, I believe you are if you landed this page by Googling, by tenths or even hundreds error messages in Console of 28/5/13 10:25:41.004 PM CalendarAgent[169]: AOSKit ERROR: (-) RAF: Invalid url -- https://USERNAME%40gmail.com@calendar.google.com/calendar/dav/USERNAME%40gmail.com/ you might take a minute to read this post.

The Cause: Apple is the one to blame

When we use System Preferences –> Mail, Contacts & Calendars to add our google accounts, and enable Calendar & Reminders Apple sets the CalDAV url to https://USERNAME%40gmail.com@calendar.google.com/calendar/dav/USERNAME%40gmail.com/, but what Google API accepts is https://USERNAME@calendar.google.com/calendar/dav/USERNAME%40gmail.com/. That is the reason the Invalid URL error happens.

Octopress SEO: Site Keywords and Description

By default, the keywords and description generated by Octopress for site are those of the first post. However, what I want is to set more suitable keywords and description for my site.

First, we and keywords and descriptions for site in _config.yml:

_config.yml
1
2
description:   #put your site description
keywords:     #put the keywords

Life of Pi – Samba Server

Update:

Fix the issue of not having writing permission on the mounted exFAT disk: In /etc/fstab add:

1
/dev/sda1  /media/Media    exfat   rw,async,umask=0 0   0

And then mount the disk:

1
sudo mount -a


I have a 2T external hard disk that is partioned into:
* 1.5T of exFAT format to store media files
* 0.5T of HFS+ as TimeMachine

1
2
3
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               2  2930667377  1465333688    7  HPFS/NTFS/exFAT
/dev/sda2   *  2930667379  3906967727   488150174+  af  HFS / HFS+

What I want to do is to mount the hard disk to my Raspberry Pi running Arch Linux ARM, then it can be used wirelessly as media hub and TimeMachine.

Mount the disk

In order to mount exFAT formatted disks, we have to install fuse-exfat and exfat-utils

1
sudo pacman -S fuse-exfat exfat-utils

Hello World

Hello erveyone, this is my first post, which is served as my assignment to Markdown.

This is a code snipet:

Discover if a number is primeSource Article
1
2
3
4
5
class Fixnum
  def prime?
    ('1' * self) !~ /^1?$|^(11+?)\1+$/
  end
end

this is italic

Markdown syntax
1
*this is italic*

Yes! I Got Qiang.Hu

Recently, I bought a new domain:Qiang.Hu

I want to try something new, so I will use Octopress, based on Jekyll, as my platform.

PHP Notes

  1. By default, mod_rewrite is not enabled in apache2, Ubuntu. Use this command to enable it:

sudo a2enmod rewrite

Then reload apache configuration file:

sudo /etc/init.d/apache2 reload

  1. After running sudo apt-get remove XXX to remove a package. The following command is needed to remove all leftover files:

sudo apt-get auto remove

 

Make Free Calls on iOS

Here some softwares I use on iPhone to make free phone calls. They are not like Skype, requiring both parties to install the software. Instead, you can call any landline or mobile phones directly, using these softwares, which is really good since my parents are only familiar with phones.

Wewe:

It was good when it provided with 60 minutes free call per day, but now it drops to 30 minutes — 0000-1800: 20 minutes, 1800  - 2400: 10 minutes.

 微微的免费网络电话政策的具体要求是什么?
-时间要求:微微免费网络电话拨打每天都可以使用30分钟,具体时长为0:00~18:00点之间可免费网络电话拨打20分钟,18:00~24:00点之间可免费网络电话拨打10分钟,邀请对方加入微微,微微免费语音视频通话无限制。
-地域要求:微微免费网络电话现在支持免费拨打中国,美国,加拿大,印度,新加坡等国家,其它国家微微正在努力开通,建议您推荐对方安装微微,这样 可以享受不受时间限制的免费通话和信息收发。

2 maaii:

 I use this one most nowadays. It gives out 1.9 USD everyday, which is equivalent to 100 minutes call.

iTunes Accounts Without Credit Card Info Are Disabled in China

Early today (2011-11-17), Apple customers in China found problems buying free apps from iTunes. All of them are using iTunes accounts without credit information.

[![][2]][2]Picture is from internet

When people are buying free apps in iTunes, they are asked to update their account information. If they refuse to do so, they will not able to purchase.

The accounts with credit information or Apple gift cards are not affected.

Apple currently accepts Visa, MasterCard and American Express. However, credit cards are not widely used in China, and many people’s credit cards are issued by UniPay. Thus, this action will affect many Apple users in China, the second largest market, accounted for 16 percent of Apple’s fourth-quarter sales, or about $4.5 billion.

It is unseen what Apple will do next. I will keep updating on this.

[Updated] Now the China Appstore supports Chinese accounts to top-up. The cheapest price of Apps is 6 CNY, 0.95 USD.