-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ff11cc
commit a8e8521
Showing
381 changed files
with
4,960 additions
and
850 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
_site | ||
.DS_Store | ||
.sass-cache |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: 404 | ||
layout: page | ||
--- | ||
|
||
Either you or Weiyang got a head stuck. Or both. :( | ||
|
||
[Look around!](/index.html) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: 404 | ||
layout: page | ||
--- | ||
|
||
Nothing found :( | ||
|
||
But you still can have a [look around](/index.html) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
weiyangthecatalyst.name |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
weiyangthecatalyst.name |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Feel free to fork. | ||
Please keep the link in the bottom. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Feel free to fork. | ||
And just please keep the link in the bottom. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
task :default => :generate | ||
|
||
desc 'Create new post with rake "post[post-name]"' | ||
task :post, [:title] do |t, args| | ||
if args.title then | ||
new_post(args.title) | ||
else | ||
puts 'rake "post[post-name]"' | ||
end | ||
end | ||
|
||
desc 'Build site with Jekyll' | ||
task :generate => [:clean, :scss] do | ||
`jekyll` | ||
end | ||
|
||
desc 'Generate css' | ||
task :scss do | ||
`scss media/css/style.scss media/css/style.css` | ||
end | ||
|
||
desc 'Start server' | ||
task :server => [:clean, :scss] do | ||
`jekyll serve -t` | ||
end | ||
|
||
desc 'Deploy with rake "depoly[comment]"' | ||
task :deploy, [:comment] => :generate do |t, args| | ||
if args.comment then | ||
`git commit . -m '#{args.comment}' && git push` | ||
else | ||
`git commit . -m 'new deployment' && git push` | ||
end | ||
end | ||
|
||
desc 'Clean up' | ||
task :clean do | ||
`rm -rf _site` | ||
end | ||
|
||
def new_post(title) | ||
time = Time.now | ||
filename = "_posts/" + time.strftime("%Y-%m-%d-") + title + '.markdown' | ||
if File.exists? filename then | ||
puts "Post already exists: #{filename}" | ||
return | ||
end | ||
uuid = `uuidgen | tr "[:upper:]" "[:lower:]" | tr -d "\n"` | ||
File.open(filename, "wb") do |f| | ||
f << <<-EOS | ||
--- | ||
title: #{title} | ||
layout: post | ||
guid: urn:uuid:#{uuid} | ||
tags: | ||
- | ||
--- | ||
EOS | ||
%x[echo "#{filename}" | pbcopy] | ||
end | ||
puts "created #{filename}" | ||
`git add #{filename}` | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
markdown: rdiscount | ||
pygments: true | ||
permalink: /:year/:month/:day/:title.html | ||
name: "[shutter release]" | ||
markdown: rdiscount | ||
|
||
author: "wayne" | ||
atom-baseurl: "http://lhzhang.com" | ||
disqus: "gopherwood" | ||
|
||
navigations: | ||
- title: Archive | ||
class: fa fa-list-ul | ||
href: /archive.html | ||
- title: Tags | ||
class: fa fa-tags | ||
href: /tags.html | ||
- title: About | ||
class: fa fa-user | ||
href: /about.html | ||
- title: Gallery | ||
class: fa fa-film | ||
href: http://foto.lhzhang.com | ||
- title: Blogroll | ||
class: fa fa-link | ||
href: /links.html | ||
- title: Subscribe | ||
class: fa fa-rss | ||
href: /atom.xml | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
<meta name="author" content="{{ site.author }}" /> | ||
{% if page.title %} | ||
<title>{{ page.title }}</title> | ||
{% else %} | ||
<title>{{ site.name }}</title> | ||
{% endif %} | ||
<link rel="shortcut icon" href="/favicon.ico"> | ||
<link href="/atom.xml" rel="alternate" title="{{ site.name }}" type="application/atom+xml" /> | ||
<link rel="stylesheet" href="/media/css/style.css"> | ||
<link rel="stylesheet" href="/media/css/github.css"> | ||
<link rel="stylesheet" href="/media/css/fontawesome.css"> | ||
<script src="/media/js/jquery-1.7.1.min.js" type="text/javascript" charset="utf-8"></script> | ||
<script type="text/javascript" src="/media/js/highlight.pack.js"></script> | ||
<script type="text/javascript"> | ||
hljs.initHighlightingOnLoad(); | ||
</script> | ||
</head> | ||
<body> | ||
<div id="main" role="main"> | ||
<header> | ||
<div id="header"> | ||
<h1><a title="{{ site.name }}" class="" href="/">{{ site.name }}</a></h1> | ||
</div> | ||
<nav> | ||
{% for nav in site.navigations %} | ||
<span><a title="{{ nav.title }}" href="{{ nav.href }}"><i class="{{ nav.class }}"></i></a></span> | ||
{% endfor %} | ||
</nav> | ||
</header> | ||
<div id="content"> | ||
{{ content }} | ||
</div> | ||
<footer> | ||
<div> | ||
{% assign first_post = site.posts | last %} | ||
© {{ first_post.date | date: "%Y" }} ~ {{ site.time | date: "%Y" }} {{ site.author }} | powered by jekyll | themed by <a href="http://lhzhang.com" title="sext vi">sext vi</a> | fork <a href="https://github.com/waynezhang/blog" title="fork me">me</a> | ||
</div> | ||
</footer> | ||
</div> <!-- main --> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
<article> | ||
{% if page.title %} | ||
<section class="title"> | ||
<h2>{{ page.title }} </h2> | ||
</section> | ||
{% endif %} | ||
<section class="post"> | ||
{{ content }} | ||
</section> | ||
</article> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
<article> | ||
<section class="title"> | ||
<h2>{{ page.title }} </h2> | ||
</section> | ||
<section class="meta"> | ||
<span class="time"> | ||
<time datetime="{{ page.date | date:"%Y-%m-%d" }}">{{ page.date | date:"%Y-%m-%d" }}</time> | ||
</span> | ||
{% if page.tags %} | ||
<span class="tags"> | ||
{% for tag in page.tags %} | ||
<a href="/tags.html#{{ tag }}" title="{{ tag }}">#{{ tag }}</a> | ||
{% endfor %} | ||
</span> | ||
{% endif %} | ||
</section> | ||
<section class="post"> | ||
{{ content }} | ||
</section> | ||
{% if page.guid %} | ||
<script type="text/javascript"> | ||
var disqus_shortname = '{{ site.disqus }}'; | ||
var disqus_identifier = '{{ page.guid }}'; | ||
|
||
function leave_comment() { | ||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; | ||
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; | ||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); | ||
$("#leave_comment_link").css("display", "none"); | ||
$("#collapse_comment_link").css("display", ""); | ||
}; | ||
function collapse_comment() { | ||
// document.getElementById("disqus_thread").innerHTML = ''; | ||
$("#disqus_thread").slideUp(400, function() { | ||
$("#disqus_thread").empty(); | ||
$("#leave_comment_link").css("display", ""); | ||
$("#collapse_comment_link").css("display", "none"); | ||
$("#disqus_thread").css("display", ""); | ||
}); | ||
}; | ||
</script> | ||
<div class="divider"> | ||
<span> | ||
{% if page.previous %} | ||
<a href="{{ page.previous.url }}"><i class="fa fa-chevron-left"></i></a> | ||
{% else %} | ||
<i class="fa fa-circle"></i> | ||
{% endif %} | ||
</span> | ||
<span><a href="javascript:leave_comment();" id="leave_comment_link"><i class="fa fa-comment-o"></i></a></span> | ||
<span><a href="javascript:collapse_comment();" id="collapse_comment_link" style="display:none;"><i class="fa fa-chevron-up"></i></a></span> | ||
<span> | ||
{% if page.next %} | ||
<a href="{{ page.next.url }}"><i class="fa fa-chevron-right"></i></a> | ||
{% else %} | ||
<i class="fa fa-circle"></i> | ||
{% endif %} | ||
</span> | ||
</div> | ||
<section class="comment"> | ||
<div id="disqus_thread"></div> | ||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> | ||
</section> | ||
{% endif %} | ||
</article> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
title: '在 linux 下驱动 Compaq 万通宝' | ||
layout: post | ||
guid: urn:uuid:b87da13a-a4dd-402f-b06a-cef7eeee2d80 | ||
tags: | ||
- linux | ||
--- | ||
|
||
近日完全转到 linux 了,不过 PocketPC 和万通宝的驱动是个大问题,Google 了好久,终于解决了万通宝的驱动,如下: | ||
|
||
万通宝的驱动要自己编译安装,所以我们必须先要安装一些必要的软件包,以ubuntu为例,debian及其它发行版会略有不同: | ||
|
||
我们需要的是 gcc,curl,cvs,以及与当前相对应的内核头文件 | ||
|
||
sudo apt-get install build-essential | ||
|
||
以上命令可安装编译所需要的软件包如 gcc,cpp等,然后是安装 cvs | ||
|
||
sudo apt-get install cvs | ||
|
||
以及当前版本的内核头文件 | ||
|
||
sudo apt-get install linux-headers-`uname -r` | ||
|
||
注意:\` 符号是 tab 键上面数字 1 键左边那个,不是单引号 | ||
|
||
然后是 curl | ||
|
||
sudo apt-get install curl | ||
|
||
以上是为了说明清楚一些,当然也可以一次性安装: | ||
|
||
sudo apt-get install build-essential cvs linux-headers-`uname -r` curl | ||
|
||
安装好必要的软件包后,我们需要从 cvs 上去 checkout 最新的驱动源码 | ||
|
||
cvs -z3 -d:pserver:[email protected]:/cvsroot/orinoco co orinoco | ||
|
||
然后编译驱动 | ||
|
||
cd orinoco | ||
|
||
make | ||
|
||
编译正确完成后需要安装 | ||
|
||
sudo make install | ||
|
||
之后我们需要去下载 windows 的 firmware,当然这个不用我们动手,已经有写好的脚本来完成了 | ||
|
||
cd firmware | ||
|
||
./get_ezusb_fw | ||
|
||
将得到的 firmware 拷贝到 linux 内核的 firmware 目录中,在 dapper (ubuntu 6.06)中为 /lib/firmware/linux-kernel-xxx (xxx为内核版本)目录中,其它发行版视实际情况而定 | ||
|
||
sudo cp ./orinoco_ezusb_fw /lib/firmware/`uname -r` | ||
|
||
现在我们可以尝试激活万通宝了 | ||
|
||
sudo modprobe -v orinoco_usb | ||
|
||
看看万通宝的绿灯有没有亮,不亮的话则需要重启一下 | ||
|
||
最后,保证系统在启动的时候自动加载万通宝模块,需要修改一下 /etc/modules 文件,在文件的末尾加一行 | ||
|
||
orinoco_usb | ||
|
||
重启,进入桌面后看看,绿灯还不亮的话试下 Fn + F2,这样子应该差不多正常工作了,enjoy~ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: '完全Linux ---- 让kaffeine显示中文字幕' | ||
layout: post | ||
guid: urn:uuid:c6675166-6afd-4741-8ccd-d40517ff5231 | ||
tags: | ||
- linux | ||
- kaffeine | ||
--- | ||
|
||
Ubuntu 6.06已经的Kaffeine已经支持字幕的显示了,但是其默认安装还不能显示中文字幕。 | ||
|
||
Kaffeine作为Xine的前端,采用Xine引擎,当然字幕的显示也是以来Xine库了。Xine的字幕显示需要自己定义的一些特殊格式的字体,而其默认安装只带了几种英文字体,这就是Kaffine之所以无法显示中文字幕的原因,知道了原因,解决起来就很容易了。 | ||
|
||
首先我们需要准备的是制作字体的工具,叫做xine-fontconv。源里的xine是没有这个工具的,有兴趣的话大家可以去SourceForge上下xine的源码,自己编译一下就可以了,比较懒的话......这里有一个编译好的版本,下来放到/usr/bin下面,其实放哪里无所谓,执行的时候找的到就行然后要找一个中文字体,不用多说了吧,/usr/share/fonts/truetype下找一个顺眼的中文自己就行了,注意一下编码是gbk & gb2312的还是big5的,这里以文鼎PL细上海宋Uni(AR PL ShanHeiSun Uni)为例,字体文件为/usr/share/fonts/truetype/arphic/uming.ttf | ||
|
||
~~下载: xine-fontconv.bin~~ | ||
|
||
进入xine的字体目录: | ||
|
||
cd /usr/share/xine/libxine1/fonts | ||
|
||
制作字体,ming是最终生成的字体名,自选,gbk是编码,以实际情况为准: | ||
|
||
xine-fontconv /usr/share/fonts/truetype/arphic/uming.ttf ming gbk | ||
|
||
等吧,很久的,去喝杯咖菲(晕,新换的雅黑字体居然没有咖fei的fei字,只好拿这个代替了)好了 | ||
|
||
之后我们会看到生成了ming-16-xinefont.gz这样的文件,就是新的字体了,16代表大小,一共会有16,20,24,32,48,64这几个,然后打开Kaffeine配置一下Xine: | ||
|
||
设置->Xine引擎参数->Subtitles,在右边的新手选项中把最后一项(encoding of the subtitles)替换为我们的编码,这里是gbk,专家选项中的第一项(font for subtitles)替换为我们的字体名,这里为ming,确定。 | ||
|
||
现在可以找个电影试一下啦,把字幕文件名的.idx,.sub,.srt等等之前的部分改成和电影文件名一样就行了,在载入的时候会提示你选字幕的 | ||
|
||
enjoy :) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: 'Linux 下 aMule 设置' | ||
layout: post | ||
guid: urn:uuid:0c997fad-353d-48a6-946f-d683d41f56f6 | ||
tags: | ||
- linux | ||
- amule | ||
--- | ||
|
||
DonkeyServer No1 (62.241.53.2:4242)已经存在,要添加的只有: | ||
|
||
华语P2P源动力 61.152.93.254:4661 | ||
Razorback 2 195.245.244.243:4661 | ||
|
||
firefox设置:地址栏输入 about:config | ||
|
||
新建一个布尔值 network.protocol-handler.external.ed2k,设为true | ||
|
||
新建字符串值 network.protocol-handler.app.ed2k,设为/usr/bin/ed2k.amule(aMule安装时的prefix/ed2k.amule) | ||
|
||
OK,记录于此,备忘 | ||
|
Oops, something went wrong.