Test Markdown Syntax

一级标题

This is a header.

  1. This is the first list item.
  2. This is the second list item.

Here’s some example code:

return shell_exec("echo $input | $markdown_script");

#include 
#include 
#include 

static int
cmpstringp(const void *p1, const void *p2)
{
    /* The actual arguments to this function are "pointers to
       pointers to char", but strcmp(3) arguments are "pointers
       to char", hence the following cast plus dereference */

return strcmp(* (char * const *) p1, * (char * const *) p2);
}

int
main(int argc, char *argv[])
{
    int j;

if (argc < 2) {
     fprintf(stderr, "Usage: %s ...\n", argv[0]);
     exit(EXIT_FAILURE);
    }
}
  • Red
  • Green
  • Blue

  • Bird

  • Mchale
  • Parish

单星号
单下划线

双星号
双下划线

发表在 Linux | 标签为 , , , | 留下评论

ubuntu下grub 引导菜单删除”多余项”

删除旧内核

sudo aptitude purge ~ilinux-image-.*\(\!`uname -r`\)

去掉修复模式菜单

sudo chmod +w /etc/default/grub

sudo gedit /etc/default/grub

把这行前面注释#号去掉:GRUB_DISABLE_LINUX_RECOVERY="true"

去掉memtest菜单

sudo chmod -x /etc/grub.d/20_memtest86+

最后运行

sudo update-grub

要改回来则
把这行前面注释加上#号:#GRUB_DISABLE_LINUX_RECOVERY="true"
sudo chmod +x /etc/grub.d/20_memtest86+
sudo updategrub

发表在 Linux | 标签为 , , | 留下评论

sudo

sudo apt-get install girlfriend
正在读取软件包列表… 完成
正在分析软件包的依赖关系 树… 完成
有一些软件包无法 被安装。
下列的信息可能会对解决问题 有所帮助:
下列的软件包有不能满足的依 赖关系:
girlfriend: 依赖: house但是它将不会被安装
girlfriend: 依赖: car但是它将不会被安装
house,car: 依赖: money但是它将不会被安装
E: 无法安装的软件包

发表在 Linux | 标签为 , | 留下评论

CreBs:让Ubuntu 定期更新墙纸

CreBs 是一个可让 Ubuntu 定期更新墙纸的软件。

安装

 sudo add-apt-repository ppa:crebs/ppa sudo apt-get update && sudo apt-get install crebs

使用

System > Preferences > ‘Create Background Slideshow’

发表在 Linux | 标签为 , , | 留下评论

在Vim中将括号自动补全:

$sudo vi /etc/vim/vimrc

在行末添加:
:inoremap ( ()<ESC>i
:inoremap ) <c-r>=ClosePair(‘)’)<CR>
:inoremap { {}<ESC>i
:inoremap } <c-r>=ClosePair(‘}’)<CR>
:inoremap [ []<ESC>i
:inoremap ] <c-r>=ClosePair(‘]’)<CR>
:inoremap < <><ESC>i
:inoremap > <c-r>=ClosePair(‘>’)<CR>

function ClosePair(char)
if getline(‘.’)[col('.') – 1] == a:char
return "\<Right>"
else
return a:char
endif
endf

重启Vim即可:-)

My Bolg

http://aoy.me

发表在 Linux | 标签为 , , | 留下评论

Rhythmbox 音乐播放器 汉字支持问题

sudo gedit /etc/profile

在最后加入

export GST_ID3_TAG_ENCODING=GBK:UTF-8:GB18030

export GST_ID3V2_TAG_ENCODING=GBK:UTF-8:GB18030

注销后重新导入歌曲信息即可解决乱码。

完美解决,这样到windows下和linux下都正常了

发表在 Linux | 标签为 , , | 留下评论

用软件实现ubuntu自动挂载NTFS分区

$sudo apt-get install ntfs-config
安装完成后输入$sudo ntfs-config
然后就会弹出来一个对话框,选择你需要挂载的分区,点应用,再选择“启用内部设备写支持”就搞定

如果你要去掉ubuntu自动挂载在桌面上的windows分区图标

gconf-editor

apps>nautilus>desktop 然后去掉volumes_visible的勾

My Bolg
http://aoy.me

发表在 Linux | 标签为 , | 留下评论

Gedit中文乱码解决方法

适用于 Ubuntu 用户,而不适用于 KUbuntu/XUbuntu 用户 缺省配置下,用 Ubuntu 的文本编辑器(gedit)打开 GB18030/GBK/GB2312 等类型的中文编码文本文件时,将会出现乱码。

出现这种情况的原因是,gedit 使用一个编码匹配列表,只有在这个列表中的编码才会进行匹配,不在这个列表中的编码将显示为乱码。您要做的就是将 GB18030 加入这个匹配列表。

您可以遵循以下步骤,使您的 gedit 正确显示中文编码文件。

1. 终端中键入“

代码:

gconf-editor

(针对用户的配置,不要sudo)
”,并按下回车键,打开“配置编辑器”。

2. 展开左边的树节点,找到 /apps/gedit-2/preferences/encodings 节点并单击它。
3. 双击右边的 auto_detected 键,打开“编辑键”对话框。
4. 单击列表右边的“添加”按钮,输入“GB18030”,单击确定按钮。

5. 列表的最底部新增加了一个“GB18030”。单击选中它,并单击右边的 “向上” 按钮直到 “GB18030” 位于列表的顶部为止。
6. 单击确定按钮,关闭配置编辑器。

现在,gedit 应该能够顺利打开 GB18030 编码的文本文件了。
Screenshot.png

发表在 Linux | 标签为 , , | 留下评论

Test

测试用邮件发布文章

发表在 Uncategorized | 留下评论

重装ubuntu

配置IPv6
sudo apt-get install miredo
改hosts

安装openvpn
sudo apt-get install network-manager-pptp
http://xuming.net/2010/04/openvpn.html

Ubuntu 下安装 Pino 请使用下列两个 PPA 。
sudo add-apt-repository ppa:vala-team/ppa
sudo add-apt-repository ppa:troorl/pino
sudo apt-get install pino

Ubuntu下安装 Ailurus
sudo add-apt-repository ppa:ailurus
sudo apt-get update
sudo apt-get install ailurus

安装Ubuntu-tweak
在http://ubuntu-tweak.com/下载deb包安装

发表在 Linux | 标签为 , , | 留下评论