-
系统字体:
/usr/share/fonts -
用户字体:
~/.fonts -
添加字体:
将字体添加到上面的目录里,然后
fc-cache清理字体缓存。如果成功,应在fc-list的结果中看到这一字体。
This file contains hidden or 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
| #!/usr/bin/ruby | |
| # | |
| # Quick proof of concept hack to get a MySQL Filesystem working via FUSE. | |
| # | |
| # Once mounted you can view all database tables and their contents. | |
| # | |
| # NB: Assumes mysqldump will run with: --user='root' --pass='' | |
| # | |
| # Documentation: | |
| # |
This file contains hidden or 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
| require 'mathn' | |
| def variance(arr) | |
| m = avg(arr) | |
| s = arr.map{|i| (i-m) ** 2 }.inject(:+).to_f | |
| s / arr.size | |
| end | |
| def avg(arr) | |
| arr.inject(:+).to_f / arr.size |
This file contains hidden or 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
| MOD = sample | |
| KPATH :=/lib/modules/$(shell uname -r)/build | |
| PWD :=$(shell pwd) | |
| obj-m = $(MOD).o | |
| all: | |
| $(MAKE) -C $(KPATH) M=$(PWD) modules | |
| clean: | |
| $(MAKE) -C $(KPATH) M=$(PWD) clean |
This file contains hidden or 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
| #include <stdio.h> | |
| inline void i_hello() { | |
| printf("hello\n"); | |
| } | |
| static inline void si_hello() { | |
| printf("static inline hello\n"); | |
| } |
This file contains hidden or 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
| /* | |
| * quick_sort.c | |
| * 2012 Dec 1 | |
| * by fleuria <me.ssword@gmail.com> | |
| * | |
| * */ | |
| #include <stdio.h> |
svn提供了比git更为精细的权限控制,按照目录为单位。
- checkout:
svn co http://svn.miaomiao.com/svn/trunk -r HEAD - 创建自己的分支目录:
svn mkdir http://svn.foo.com/svn/branches/fleuria - 创建特性分支:
svn cp http://svn.foo.com/svn/trunk http://svn.foo.com/svn/branches/fleuria/issue1 - 切换分支:
svn switch http://svn.foo.com/svn/branches/fleuria/issue1 - 不像git有暂存区,svn在提交时只能将需要提交的文件列在命令里:
svn commit -m 'commit message' file1.c file2.c - 撤销当前的所有更改:
svn revert -R .
This file contains hidden or 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
| # Thinkpad Trackpoint Scrolling | |
| http://psung.blogspot.jp/2010/04/thinkpad-trackpoint-scrolling-in-ubuntu.html | |
| 保存到`/usr/share/X11/xorg.conf.d/20-thinkpad.conf ` | |
| ``` | |
| Section "InputClass" | |
| Identifier "Trackpoint Wheel Emulation" | |
| MatchProduct "TrackPoint" |
This file contains hidden or 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
| #!/bin/bash | |
| # | |
| # Copyright: TualatriX <tualatrix@gmail.com> GPL v3 | |
| # | |
| # Website: http://imtx.cn/archives/1516.html | |
| # | |
| # Please add the following line to ~/.bashrc to enable the bash completion support | |
| # | |
| # complete -o filenames -F _root_command notify |
This file contains hidden or 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
| #!/bin/bash | |
| # | |
| # Copyright: TualatriX <tualatrix@gmail.com> GPL v3 | |
| # | |
| # Website: http://imtx.cn/archives/1516.html | |
| # | |
| # Please add the following line to ~/.bashrc to enable the bash completion support | |
| # | |
| # complete -o filenames -F _root_command notify |