Chinaunix首页 | 论坛 | 博客
  • 博客访问: 70701
  • 博文数量: 7
  • 博客积分: 756
  • 博客等级: 军士长
  • 技术积分: 54
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-28 10:23
文章分类
文章存档

2017年(1)

2014年(2)

2013年(1)

2011年(1)

2010年(1)

2008年(1)

分类: LINUX

2014-06-02 23:19:49

原文地址:mac os x 日志 作者:fellowhua

last update: 5/29/2012

OS: mac osx  lion 10.7.4

in default terminal of mac osx
Attention: cp file1/ file2/
    will copy the files in file1 to file2, rather than the folder file1
----------------------------------------------------------------------------------------------------------------------------------------
disk partition:
    using "disk utility" in folder "Utilities". At first waiting for disk partition for a long time and force quit then try again and seceed.
----------------------------------------------------------------------------------------------------------------------------------------

install following software:
    MS office 2008 ,Adobe professional, stardict, mathematica, fink in order to install unix and deb software, Macports, MacTex, gnuplot, xcode from apple, gfortran
    Fun input: good chinese input
    Windows in Vmware fusion

----------------------------------------------------------------------------------------------------------------------------------------

install gnome-terminal
  1. download and install darwinports.
  2.sudo port -d selfupdate
  3.do as this link: 
      cd /opt/local/bin/portslocation/dports/gnome-terminal
      sudo port install gnome-terminal

  4. some info about gnome-terminal by the following cmd
    man gnome-terminal
    apropos gnome-terminal
    which gnome-terminal
    locate gnome-terminal
  5.run gnome-terminal:
    if there's an error about dbus, run the following cmd first.
  6. put gnome-terminal on the Dock
         a. Launch AppleScript (Applications > AppleScript > Script Editor)
       b. Create the following script:
               do shell script "/usr/bin/open -a X11 /opt/local/bin/gnome-terminal "
       c. Save the script somewhere using “application” as the file format
       d. 2xClick the new app and gnome-terminal will launch. If X11 has not been launched yet, this should launch X.

      /opt/local/bin

      launchctl load /Library/LaunchAgents/org.freedesktop.dbus-session.plist
    gnome-terminal
----------------------------------------------------------------------------------------------------------------------------------------

7. install stardict dict
   copy files to opt/gtk/share/stardict/dic/
----------------------------------------------------------------------------------------------------------------------------------------

8. mactex(texlive 2008) chinese fonts?
      see the examples in /usr/local/texlive/2008/texmf-dist/doc/latex/cjk/examples and the readmefile
    using cas thesis form? just copy cct folder in windows to "./texmf-local/tex/latex/cct", then texhash and mktexlsr.
    utf8 for chinese fonts?
        \usepackage{CJK}
        \usepackage{latexsym,amsfonts,amsmath,amssymb,graphicx}
        \begin{CJK*}{UTF8}{gbsn}
----------------------------------------------------------------------------------------------------------------------------------------

9.add ttf fonts to mactex?
    a. make sure ttf2pt1 installed()
    b. download mkfont.sh from
    c. add fonts from this website.
----------------------------------------------------------------------------------------------------------------------------------------

10. Enable root user
   1.  From the Finder's Go menu, choose Utilities.
   2. Open Directory Utility.
   3. Click the lock in the Directory Utility window.
   4. Enter an administrator account name and password, then click OK.
   5. Choose Enable Root User from the "Edit" menu.
   6. Enter the root password you wish to use in both the Password and Verify fields, then click OK.
----------------------------------------------------------------------------------------------------------------------------------------

11. install dos2unix by apt-get
----------------------------------------------------------------------------------------------------------------------------------------

12. vi 不显示行号和列号?
    set ruler
----------------------------------------------------------------------------------------------------------------------------------------

13. windows file enter with ^M?
    :% s/^M/\r/g
    注意 ^M 的输入用? Ctrl+v,再按回车,或者是 Ctrl+v, Ctrl+m。
----------------------------------------------------------------------------------------------------------------------------------------

14. tab space during copy in vim
    set paste
----------------------------------------------------------------------------------------------------------------------------------------

15. Windows Xp task manager in vmware fusion?
    Ctrl+shift+ESC
----------------------------------------------------------------------------------------------------------------------------------------

16. texshop change between source code and pdf file
    cmd+double of single click
----------------------------------------------------------------------------------------------------------------------------------------

17. open new finder?
    right click finder ico in dock, then choose open new window
    or  hold cmd key while clicking the folder
----------------------------------------------------------------------------------------------------------------------------------------

18. firefox 3.1 undo?
    shift+cmd+t
----------------------------------------------------------------------------------------------------------------------------------------

19. home and end shortcut
    home: ctrl+a, end: ctrl+e
----------------------------------------------------------------------------------------------------------------------------------------

20. during use f95, following warning:
    ld warning: duplicate dylib /usr/local/lib/libgcc_s.1.dylib
  solution: delete this file, or remove this file
----------------------------------------------------------------------------------------------------------------------------------------

21. connect shared folder on windows.
    finder->go->connect to server: smb://ipaddress
----------------------------------------------------------------------------------------------------------------------------------------

22. mplayer fonts:
    copy simsun to Applications/MPlayer OS X 2.app/Contents/Resources/Fonts/simsun.ttf
----------------------------------------------------------------------------------------------------------------------------------------

23. missing fonts when opening doc file with word?
     word-preference-compatibility->font substitution--
        change the missing fonts with others.
----------------------------------------------------------------------------------------------------------------------------------------

24.Quick Look .eps files in Finder? 
    download:EPSQuickLookPlugin
----------------------------------------------------------------------------------------------------------------------------------------

25. install mysql+mediawiki
    start mysql: sudo mysqld_safe --user=root
----------------------------------------------------------------------------------------------------------------------------------------

26. add luna calendar to icalendar
    luna:%40holiday.calendar.google.com/public/basic.ics
    holiday:
    %40group.calendar.google.com/public/basic.ics
----------------------------------------------------------------------------------------------------------------------------------------

27. screen shot:
    shift+cmd+3 full screen
    shift+cmd+4 select area
----------------------------------------------------------------------------------------------------------------------------------------

28. dvi viewer and eps viewer
    xdvi and preview
----------------------------------------------------------------------------------------------------------------------------------------

29. bash
    get 1.f :basename /var/1.f   
    get /var: dirname
----------------------------------------------------------------------------------------------------------------------------------------

30.Changing the position of a pin on a Places map
You can change the position of a marker pin for a photo, even if the photo was taken with a GPS-enabled camera.
To change a pin’s position:

Select a photo that has a pin in the wrong position on the Places map.
Click the Information button in the lower-right corner.
This “flips” the photo so that you can enter information about it on the “back.”
Click the location name, and choose “Find on map” from the pop-up menu.
The Add New Place dialog appears.
Do one of the following:
Drag the pin on the map. You can click the plus and minus signs to zoom in or out, drag the map to center on the area you want, and then drag the marker pin to the right location. To place the pin more accurately, zoom in and drag it as needed.
Once the marker pin is in the right place, you can drag the circle arrow to adjust the vicinity.
In the search field, type as much of the full name and address as you can (for example, “123 Oak St., Lincoln, NE” or “The White House”), and then press the Return key.
The pin appears in that location. If you want to fine-tune the location, you can drag the marker pin to a desired spot. Drag the arrow on the circle to increase or decrease the vicinity covered by this location.
Click the “Assign to photo” button in the dialog when you’re finished.
Click Done in the dialog.
To see your photo in Places, select Places in the Source list.
----------------------------------------------------------------------------------------------------------------------------------------

31. connect to windows share folder
    finder->go-->connect server
        smb://ip
----------------------------------------------------------------------------------------------------------------------------------------

32. snippetsEmu : An attempt to emulate TextMate's snippet expansion
    conflict with "set paste" in .vimrc
----------------------------------------------------------------------------------------------------------------------------------------

33. install xfig and dia by sudo port install xfig(dia)
----------------------------------------------------------------------------------------------------------------------------------------

34. vim: current row to n:  :,+n balabala
----------------------------------------------------------------------------------------------------------------------------------------

35. move the icons on the taskbar  by holding command key
----------------------------------------------------------------------------------------------------------------------------------------

36. Input equation in keynotes or other tools?
    use Latexit installed from MacTex.
----------------------------------------------------------------------------------------------------------------------------------------

Quick look shortcut:
    space open and close quicklook
----------------------------------------------------------------------------------------------------------------------------------------

37. 快捷键
在启动时按下 X: 强制使用 Mac OS X 启动电脑
在启动时按下 Option-Command-Shift-Delete: 不使用主要启动硬盘,并寻找使用外接磁盘与 CD
在启动时按下 C: 由具有系统文件夹的 CD 光盘启动
在启动时按下 N: 试图由兼容的网络服务器 (NetBoot) 启动
在启动时按下 T: 以火线目标磁盘方式启动
在启动时按下 Shift: Mac OS X 10.2 后,在「安全启动状态」启动,一切启动项目及不必要运行的核心扩展文件皆不运行
在启动时按下 Command-V: 以 Verbose 状态启动,将临时进入 UNIX 界面,短时不可使用鼠标
在启动时按下 Command-S: 以单一用户状态启动,将进入 UNIX 界面,不可使用鼠标
Finder 窗口
Command-W: 关闭窗口
Option-Command-W: 关闭一切窗口
Command-右方向箭头: 在列表中扩展文件夹内容
Option-Command-右方向箭头: 在列表中扩展此文件夹及一切下属文件夹内容
Command-左方向箭头: 在列表中缩闭文件夹内容
Option-Command-上方向箭头: 打开所述文件夹,并关闭现在窗口
菜单指令
Shift-Command-Q (苹果菜单): 登出用户
Shift-Option-Command-Q (苹果菜单): 立即登出用户
Shift-Command-Delete (Finder 菜单): 倾倒废纸篓
Option-Shift-Command-Delete (Finder 菜单): 倾倒废纸篓,而不需要经由确认对话框确定
Command-H (Finder 菜单): 菜单隐藏 Finder
Option-Command-H (Finder 菜单): 隐藏其他应用程序
Command-N: 在 Finder 中由文件菜单开启新 Finder 窗口
Shift-Command-N: 在 Finder 中由文件菜单创建新文件夹
Command-O (文件菜单): 打开文件
Command-S (文件菜单): 保存资料
Shift-Command-S (文件菜单): 保存资料,名称由用户输入
Command-P (文件菜单): 打印
Command-W (文件菜单): 关闭窗口
Option-Command-W (文件菜单): 关闭一切窗口
Command-I (文件菜单): 打开项目简介
Option-Command-I (文件菜单): 显示属性窗口
Command-D (文件菜单): 复制
Command-L (文件菜单): 在 Finder 中创建替身
Command-R (文件菜单): 显示原身
Command-T (文件菜单): 在 Finder 中,Mac OS X v10.2.8 或者更早操作系统软件版本将所选项目添加至喜好项目内,在 Mac OS X v10.3 及更新版本将所选项目添加至左侧工具条内;如果需要增加至喜好项目内,则须用 Shift-Command-T
Command-Delete (文件菜单): 在 Finder 中,移除至废纸篓
Command-E (文件菜单): 在 Finder 中,推出设备
Command-F (文件菜单): 查寻
Command-Z (编辑菜单): 还原
Command-X (编辑菜单): 剪切
Command-C (编辑菜单): 拷贝
Command-V (编辑菜单): 粘贴
Command-A (编辑菜单): 选定一切
Command-1 (显示菜单): 在 Finder 中,将显示方式设定为图标[BOTAnswer:怎么样改系统内的图标。]
Command-2 (显示菜单): 在 Finder 中,将显示方式设定为列表
Command-3 (显示菜单): 在 Finder 中,将显示方式设定为分栏
Command-B (显示菜单): 在 Finder 中隐藏工具栏
Command-J (显示菜单): 在 Finder 中查看显示
Command-[ (转到菜单): 在 Finder 中向最近查看的一个窗口显示内容后退
Command-] (转到菜单): 在 Finder 中向最近查看的一个窗口显示内容前进
Shift-Command-C (转到菜单): 在 Finder 中显示「电脑」窗口
Shift-Command-H (转到菜单): 在 Finder 中显示「个人」窗口
Shift-Command-I (转到菜单): 在 Finder 中显示 iDisk 内容
Shift-Command-A (转到菜单): 在 Finder 中显示应用程序文件夹
Shift-Command-F (转到菜单): 在 Finder 中显示「喜好项目」
Shift-Command-G (转到菜单): 在 Finder 中转至文件夹
Command-K (转到菜单): 在 Finder 中连接至服务器
Command-M (转到菜单): 缩小窗口至 Dock
Option-Command-M (转到菜单): 缩小一切窗口至 Dock
Command-? (帮助菜单): 打开帮助资料
Command-Space (Spotlight[Spotlight的更多高级技巧] 菜单): 激活并使用 Spotlight[Spotlight的更多高级技巧] (限 Mac OS X v10.4 及更新版本的操作系统软件)
    万能辅助与 VoiceOver
    Option-Command-8: 开启放大功能
    Option-Command-+ (加号): 放大
    Option-Command– (减号): 缩小
    Control-Option-Command-8: 开启白底黑字
    Control-F1: 开启全键盘控制 (可以使用再下列表的快捷键)
    Control-F2: 全键盘控制: 选定菜单
    Control-F3: 全键盘控制: 选定 Dock
    Control-F4: 全键盘控制: 选定现在窗口或在其后面的下一个窗口
    Control-F5: 全键盘控制: 选定工具栏
    Control-F6: 全键盘控制: 选定辅助工具窗口
    Command-F5 或 fn-Command-F5: 在 Mac OS X v10.4 或更新操作系统软件,开启或关闭 VoiceOver
    Control-Option-F8 或 fn-Control-Option-F8: 在 Mac OS X v10.4 或更新版本,开启 VoiceOver 实用程序
    Control-Option-F7 或 fn-Control-Option-F7: 在 Mac OS X v10.4 或更新版本,显示 VoiceOver 菜单
    Control-Option-; 或 fn-Control-option-;: 在 Mac OS X v10.4 或更新版本,激活或关闭 VoiceOver Control-Option 锁定
    当全键盘控制功能开启,可使用下列数码键盘按钮;如果无此键盘,则应同时按下 Fn 功能键:
    8: 向上移动
    2: 向下移动
    4: 向左移动
    6: 向右移动
    1、3、7 与 9: 斜行方向移动
    5: 点按鼠标按钮一次
    0: 点按鼠标按钮一次,而保留按下
    . (句号): 0 按下后,按此键解开鼠标按钮按下锁定
    其他指令
    Option-Command-D: 显示或隐藏 Dock
    Command-Tab: 更换应用程序
    Tab: 选定下一个项目
    Command-上方向箭头: 转入向上的文件夹
    Command-下方向箭头: 转入向下的文件夹
    Page Up 或 Control-上方向箭头: 往上移动一页
    Page Down 或 Control-下方向箭头: 往下移动一页
    鼠标按键按下并拖项目时按下 Option: 在新位置中创建复件
    鼠标按键按下并拖项目时按下 Option-Command: 在新位置中创建替身
    鼠标按键按下并拖项目时按下 Command: 移至新位置,而不创建复件
    Shift-Command-C: 在应用程序中显示彩色选项小窗口
    Command-T: 在应用程序中显示字体选项小窗口
    Command-Shift-3: 拍摄显示屏内容
    Command-Shift-3 并选定时按下 Control: 拍摄显示屏内容,并将其图像内容置于夹纸板内 (此快捷键未出现在苹果英文原文内,由北麦自行所发现)
    Command-Shift-4: 拍摄所选定的显示屏部分内容
    Command-Shift-4 并选定时按下 Control: 拍摄所选定的显示屏部分内容,并将其图像内容置于夹纸板内
    Command-Shift-4 并按下空格按键: 拍摄所选定的窗口的显示屏内容
    Option-Command-esc: 强制退出
    Control-Eject: 显示可以选定重新开启系统、睡眠与关机的选择对话框,在笔记本中按下 Power Button 电源开关按钮起同样作用
    Control-Command-Eject: 关闭一切应用程序,并重新开启系统
    Option-Command-Eject 或 Option-Command-电源开关按钮: 进入睡眠状态,在笔记本中关上盒子可起同样作用
    在点按窗口工具栏按钮时按下 Command: 循环选定此窗口所提供的不同显示方式,根据 Finder 或应用程序可出现不同显示方式
    Command-`: 在开启一个窗口以上的应用程序或 Finder 中,循环选定窗口
    Function-Delete (限笔记本电脑即 PowerBook、iBook、MacBook 与 MacBook Pro): 前进删除字符,即删除在文字输入处以右而非以左的字符
----------------------------------------------------------------------------------------------------------------------------------------

38.install packages Mathworld for mathematica

cp the packge directory to /Applactions/Mathemaita/Addon*/Applation/Mathworld
----------------------------------------------------------------------------------------------------------------------------------------

39.plot figure in mathematica, then copy it to preview.
add text on figure?
    click figure-->Graphics-->Drawing tools->texttool, you can add a space during input
pdf2eps? just open it in adobe reader then save as.
----------------------------------------------------------------------------------------------------------------------------------------

40.Airport can't get ip for both wireless and wire connection?
    solution: systempref-->security-->select the first of 2nd item. If choose the 3rd, sometimes macbook can't get ipaddress(169.*.*.*).
----------------------------------------------------------------------------------------------------------------------------------------

41.open files with default app?
    solution: get info-->all
----------------------------------------------------------------------------------------------------------------------------------------

42.rington for iphone?
    in iTunes: select part song less than 30', create AAC, then show in finder, and mv name.m4r
----------------------------------------------------------------------------------------------------------------------------------------

43.rsync sync files for local and remote
----------------------------------------------------------------------------------------------------------------------------------------

44.add printers shared from windows samba

system preference->printer&fax->add printer->Advanced(if none, right click toolbar, add advanced)
    ->type:windows, ....
Ref:
    sometimes stop when print? just reset printing system and add printer again.
----------------------------------------------------------------------------------------------------------------------------------------

45.shared the ethnet by airport with windows computer.
    In windows, add the ssid of aiport and make sure disable the IEEE 802 1.x confirmation in the
    properties of wireless    airport.
    无线网络属性->关联->共享式网络链接,并输入密码
    By the way, if share the connection with non-apple computer, use 5 character password for 40bit wep-key
----------------------------------------------------------------------------------------------------------------------------------------

46.中文复制搜索问题:
    dvipdfmx 直接默认使用ttf字体,所以可以中文正常复制;
    pdflatex 只要在导演区里加上\usepackage{ccmap} 即可实现在用type1字体情况下实现中文复制;
    以上同时适用于gbk/utf8两种编码;

.中文书签问题:
    GBK编码:我们只要利用cct提供的gbk2uni程序来解决即可;同时适用latex和pdflatex;
    使用方法:latex foo; gbk2uni foo; latex foo ;三步即可;当然,用ctex一步即可;

UTF-8编码:现在有比较好的解决方法
    全部使用CJKutf8宏包来替代CJK宏包,对utf8编码支持更加完善,并且直接支持中文书签,不需要额外处理;
    注:要同时使用CJKutf8和unicode的hyperref;
    \usepackage{CJKutf8}
    \usepackage[unicode]{hyperref}

gbk2uni下载地址:
   
----------------------------------------------------------------------------------------------------------------------------------------

47.beamer顶端导航中文无法显示?
    \documentclass[CJK]{beamer}
----------------------------------------------------------------------------------------------------------------------------------------

48.create eps file from pdf file
    1.copy the selected figure from adobe reader
    2.create new file in preview, and save as pdf file
    3. open pdf file with adobereader, save as eps file
----------------------------------------------------------------------------------------------------------------------------------------

49.fonts directory:
    /System/Libray/Fonts or Library/Fonts,
----------------------------------------------------------------------------------------------------------------------------------------

50.go back and forward in firefox 3.5 by multitouch
    1.about:configure
    2.search "browser.gesture.twist"
        “browser.gesture.twist.left”=“Browser:PrevTab” 
        “browser.gesture.twist.right”=“Browser:NextTab”
-------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------
51. Places problem in iphoto?
    update java
----------------------------------------------------------------
52.merge many pdf files in one ?
    sudo port install pdftk
    pdftk 1.pdf 2.pdf output m.pdf
---------------------------------------------------------------------
53. 通过ssh登录mac乱码?
    locale查看 LANG=C
    解决 export LANG=en.US.UTF-8
------------------------------------------------------------
54. install g95
    sudo port install g95
------------------------------------------
55.ifort error: ipo: warning #11009: file format not recognized for ../../Commons/env/liblinux//libnetcdf.a
ld warning: in ../../Commons/env/liblinux//libnetcdf.a, file is not of required architecture

    solution:install netcdf
        FC= ./configure

----------------------------------------
57. enable firefox bookmarks in QuickSilver
Open about:config in Firefox Location bar, agree that you won't mess
anything up.

Search for "browser.bookmarks.autoExportHTML"

Double click it to enable it (Or right click it and hit toggle)

    Restart Firefox & Quicksilver...

    "browser.bookmarks.autoExportHTML" makes firefox generate a new
    bookmarks.html at a certain point (don't know when).

    Haven't found a way to do this with History, but I don't use that and
    thus don't care...

---------------------------------------
can't login at startup window?
    try click the touchpad instead of tap

    ---------------------------------------
add powerword dictionary in stardict or Dict in macbook

    use DictUnifier convert
-------------------------------
problems after updating to snow leopard
手写: ctrl+shift+space
64bit kernel: 4+6 during start

gcc compiler error
    solution: upgrade xcode using the snow leopard disk
darwin port doesn't work any more?
    solution: download the lastest darwin version(Macports-1.8.0), install

--------------------------------------------------------------------------------   
problem: ld: warning: in main.o, file is not of required architecture
    Undefined symbols:
      "_MAIN__", referenced from:
        _main in libgfortranbegin.a(fmain.o)
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make: *** [main] Error 1

---------------------------------------------------------------------------
latex
newcommand中注意不能有全角空格
在幻灯片形式的pdf中常常需要跳转,这时可以用frame环境的label选项配合\hyperlink命令来实现。具体的就是 \begin{frame}[label=xxxx] ..... \end{frame} 之后就可以用\hyperlink{xxxx}{\beamergotobutton{按钮显示的名字}}来指向它,其中 \beamergotobutton可以用\beamerbutton, \beamerreturnbutton来替换
----------------------------------------------------------------------------
9/6/2009
离线wikipedia for mac osX

参考:MAC OS X离线版Wikipedia部署教程


1.环境:MAC OS X 10.6(Snow Leopard),必须安装Xcode,和Xcode中包含的UnixDev Tools这个环境
需要的开发包:PHP5(5.2.9-7)、xapian-core-1.0.15、Django-1.1、mediawiki_sa

2.下载安装Django
    下载:
    安装: sudo python setup.py install

3. 下载安装xapian-core
    下载:
     修改common里的gnu_getopt.h文件,61行到66行修改如下
        extern "C" {
        extern char *optarg;
        extern int optind;
        extern int opterr;
        extern int optopt;
        }
    安装: ./configure&& make && make install

4.下载主程序包offlinewikipedia和mediawiki_sa包,分别解压,并把mediawiki_sa解压文件移动到主程序包目录下,

    ~ttsiod/offline.wikipedia.tar.bz2
    ~ttsiod/mediawiki_sa.tar.7z

    修改主目录中的show.pl,修改第64行为:
    system("cd ../mediawiki_sa/ && /usr/local/php5/bin/php testparser.php /var/tmp/result > /var/tmp/result.tmp");

    将下载的wiki镜像文件(很大)放到主目录的wiki-splits目录下
    修改Makefile中的第一行为下载的wiki镜像文件名

    运行: make mediawiki 进行分割、索引、写文件,时间比较长,最后提示:
    -----------
    To run your local wikipedia, just
    cd mywiki
    python manage.py runserver
    and point your browser to
    ------------
5.使用
    打开主目录下的mywiki目录,执行
     python manage.py runserver
    地址栏输入

---------------------------------------
can't use gnome-terminal in remote X11 by ssh?
    solution: downgrading gnome-terminal 2.24.x-x
---------------------------------------
using ctags in vim
    ctl+} to subroutine
    ctrl+t back to main program
---------------------------------------
macbook airport无法搜到无线路由?
    将路由channel设为6, 若channel 13, 经常无法搜到
--------------------------------------
vista下adobe acrobat professional 打开几秒后自动退出?
    不要把FLEXnet Licensing service禁掉
-----------------------------------------
如何用ssh挂载远程目录
当我们需要管理一台远程的linux服务器的时候经常使用的是比较安全的ssh。这里提供一个使用sshfs来挂载远程目录的方法。
当你准备好开始做的时候请打开一个中端并按照下面的步骤进行操作:
1、    sudo apt-get install sshfs
2、    sudo modprobe fuse
3、    sudo adduser fuse
4、    sudo chown root:fuse /dev/fuse
5、    sudo chmod +x /dev/fusermount
6、    mkdir ~/remoteserv
7、    sshfs @:/remotepath ~/remoteserv
8.umount: fusemount -u mount_point
9.如果想每次开机都自动挂载,可以在/etc/fstab中加入:
sshfs#user@hostname:path mount_point fuse defaults,auto,allow_other 0 0
这就要求必须先把ssh自动登录配置好了,让root用户能够使用user身份登录远程主机,另外allow_other这个参数很重要,没有这个参数的话,挂载过来的目录只有root能够访问。
---------------------------------------------
grep -n keywords *.f
-------------------------------------------------------
更改mac登陆界面语言

sudo /System/Library/CoreServices/Language\ Chooser.app/Contents/MacOS/Language\ Chooser

restart and relogin
-------------------------
serial number software: KCNscrew
-------------------------
10/18/2009

set locale for iTerm: add "export LANG=en_US.UTF-8" in ~/.profile
iTerm will read file .profile rather than .bashrc
----------------------------
10/18/2009
no high search with vim in terminal
solution: set hlsearch
----------------------------
10/18/2009
给不同的目录设置不同的颜色:

修改~/.bash_profile or .bashrc文件,在文件中加入下面两行配置。
    export CLICOLOR=1
    export LSCOLORS=gxfxaxdxcxegedabagacad
那么应该怎样来配置成我喜欢的颜色呢?下面我们就来详细说一些这些配置。

~/.bash_profile是bash shell中当前登录用户的配置文件。bash是“终端”中默认的shell。

alias ls=”ls -G”是给”ls -G”起了一个别名,当执行ls时,就相当于执行了ls -G。

CLICOLOR是用来设置是否进行颜色的显示。CLI是Command Line Interface的缩写。

LSCOLORS是用来设置当CLICOLOR被启用后,各种文件类型的颜色。LSCOLORS的值中每两个字母为一组,分别设置某个文件类型的文字颜色和背景颜色。LSCOLORS中一共11组颜色设置,按照先后顺序,分别对以下的文件类型进行设置:

   1. directory
   2. symbolic link
   3. socket
   4. pipe
   5. executable
   6. block special
   7. character special
   8. executable with setuid bit set
   9. executable with setgid bit set
  10. directory writable to others, with sticky bit
  11. directory writable to others, without sticky bit

LSCOLORS中,字母代表的颜色如下:

    * a 黑色
    * b 红色
    * c 绿色
    * d 棕色
    * e 蓝色
    * f 洋红色
    * g 青色
    * h 浅灰色
    * A 黑色粗体
    * B 红色粗体
    * C 绿色粗体
    * D 棕色粗体
    * E 蓝色粗体
    * F 洋红色粗体
    * G 青色粗体
    * H 浅灰色粗体
    * x 系统默认颜色

----------------------------------------------
final cut studio 3 播放剪辑显示未渲染
解决:设置中-回放控制-实时:无限
---------------------------------------------
多个文件搜索
find . -name "*.txt" -exec grep "hello" {} -nH \;
-------------------------------------------
install sed 4.2
download the source code of sed-4.2
./configure --prefix=/usr
make
sudo make install
-----------------------------------------
批量更改文件名,如将该目录下所有文件加前缀
for i in `ls *.pdf`;do mv ${i} "pre_"${i}; done
--------------------------------------
vim 配色方案

vim配色脚本位于/usr/share/vim/vim71/colors/*,复制到 ~/.vim/colors/  
vim中使用:colorscheme morning命令即可使用morning配色,该命令自动读取/usr/share/vim72/colors/ or ~/.vim/colors/
linux默认的配色使用的是peachpuff.vim,而自己不满意的就是默认中的折叠的颜色,虽然为灰白色,时间
长了,仍感觉很刺眼。而desert.vim中的注释行的颜色很不错,是darkyan,即为暗青色,很养眼,颜色行为desert.vim的96行:
hi Comment      ctermfg=darkcyan
既然找到了养眼的颜色,那就把这个darkyan放到peachpuff.vim中吧。
在peachpuff.vim中的40行是折叠的配色:
hi Folded term=standout ctermfg=4 ctermbg=7 guifg=Black guibg=#e3c1a5
改为如下:
hi Folded term=standout ctermfg=darkcyan ctermbg=NONE guifg=Black guibg=#e3c1a5
最后想要默认使用这个配色,需要在.vimrc中使用如下命令:
colorscheme peachpuff
-------------------------------------------------------------
使用adobe pdf professional 拆分pdf文件
    通过左侧选择要提取的页面,点击右键-提取即可
-------------------------------------------------------------
KCN序列号大全
------------------------------------------------------------
date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
      DATE: 1987-11-21
      TIME: 13:36:16
------------------------------------------------------------
final cut 导入音频嘟嘟响
solution:渲染(cmd+R) 或者 sequence-render selection(audio)

final cut 全屏预览
    view-external video(all frame) or cmd+F12

final cut 变速:左下角key frame 然后选取即可
----------------------------------------------------
rar解压乱码
使用Ez7Z解压
-----------------------------------------------
4/1/2010

add ttf chinese fonts for mac texlive 2009

    1.downloads cmactex.tar.gz from
    2.copy chinese fonts (simsun.ttf, simkai.ttf, simhei.ttf, simfs.ttf, simli.ttf, simyou.ttf) to /usr/local/texlive/2008/texmf-dist/fonts/truetype/Chinese
    3. cd ~/.texlive2008/bin
    4. ./mkexpfonts (see this script for details)
    5.     mktexlsr
         updmap --syncwithtrees
         updmap

cfonts installed: kai sthei stxi
---------------------------------------------------------
---------------------------------------------------
4/6/2010
pdfscreen 右侧导航更新

解决: 删除toc aux等临时性文件
--------------------------------------------------
latex 荧光笔效果(仅能用于英文)
\usepackage{color,soul}

\sethlcolor{green}
This is some \hl{highlighted\\ text} blah blah.
-------------------------------------------------
登录google groups

groups.google.com.bz
-------------------------------------------------
vmfusion 打开任务管理器

ctrl+shift+esc
-------------------------------------------------
linux下cups共享打印机
开启cups服务及daemon服务,firefox里面localhost:631配置
1. printer,找到要添加的打印机地址
添加网络打印机,或者mac下面打印机
无法双面打印?下载专门的驱动

无法打印?看一下系统盘是否还有空间,曾经/var/log/messges文件25G,占用了所有硬盘空间

mac下双面打印需要选择打印机驱动 2015-cute哪个
------------------------------------------------
安装cscope for vim

下载或者直接port install cscope
到~/.vim/plugins, 并在.vimrc添加source cscope_maps.vim
------------------------------------------------
查看文件架构信息:
file filename
-----------------------------------------------
5/29/2010
最近使用pspdf, epstopdf时,出现libpng架构不对?
原因:用macport安装的libpng,在snowleopard下默认是x86_64
解决:修改/opt/local/etc/macports/macports.conf
build_arch i386
卸载libpng然后重新安装即可
port 使用说明
强制删除  sudo port -f uninstall packagename
出现如下问题
--->  The following versions of libpng are currently installed:
--->    libpng @1.2.35_0
--->    libpng @1.2.40_0
--->    libpng @1.2.43_0 (active)
Error: port uninstall failed: Registry error: Please specify the full version as recorded in the port registry.
解决:sudo port -f unistall libpng @1.2.43_0
------------------------------------------------
5/31/2010

to be done: install the netcdf package for WRF
-------------------------------------------------
6/22/2010
install mpich2 on mac x86-64:

./configure FC=/usr/bin/ifort F77=/usr/bin/ifort F95=/usr/bin/ifort -prefix=/usr/local/mpich2
------------------------------------------------
ssh-keygen -t rsa
copy content of *.pub to client .ssh/authorized_keys
chmod 600 -R .ssh
restart ssh
------------------------------------------------------
mpirun -np 2 helloworld 
problem: problem with execution of helloworld  on  macin.local:  [Errno 2] No such file or directory 
solution: mpirun -np 2 ./helloworld
---------------------------------------------------
查看文件所属包
port provides filename
------------------------------------------------------

word2007 中引入了Word Reference Builder的特性,其管理引用文献的功能和EndNote是相互竞争的。但目前Word2007的Reference管理功能还不是很成熟(1) Reference引用和输出格式可调整性还比较差,citation的模板也比较少(2)不能和SCI、EI等文献检索机构实现互联(3)不方便在阅读 referenced paper的同时,整理读书笔记以及关联pdf文档。
所以在以后一段时间内,还是推荐使用EndNote来做自己的文献索引和bibliography的管理。下面step-by-step介绍如何将EndNotes X作为add-in和Word2007整合:
在 Word2007里,用alt F打开File菜单,然后点击“Word选项”按钮在弹出的“Word选项”对话框里,在左侧区域选择“信任中心”。然后在右侧区域点击“信任中心设置”按钮在弹出的“信任中心”对话框里,在左侧区域选择“受信任位置”。然后激活右侧区域里的“...\Microsoft\Word\Startup Word 2007默认位置:启动” 注意这个路径就是用来放置word启用时加载的那些add-in的地方。记住这个url。并在explorer里打开它。关闭所有正在运行的Word, Outlook 等office组件 再用一个explorer,导向到EndNote X的安装目录,如C:\Program Files\EndNote X 从到EndNote X的安装目录下,找到文件EN10CWYW.dot和EN10Cwyw.WordXP.wll。 将这两个文件拷贝到step 4打开的word startup folder。 启动Word2007。在Add-in加载项菜单里就可以看见EndNote X的工具栏了。


-------------------------------------------------------------
7/22/2010
install torque 2.4.8 for mac osx 
./configure CC="gcc -m64" --disable-gcc-warnings 
make 
make install
if meet errors during make with no X11/Xlib.h found
just do 
sudo ln -sf /opt/local/include/X11 /usr/local/include/X11 

start qsub?
solution: pbs_server -t create

got it!!

-------------------------------------------------------------
7/29/2010

ssh: X11 connection rejected because of wrong authentication?
solution: check whether there's enough spaces
----------------------------------------------------------
7/29/2010

screen
screen -ls: list or check pid of all screen progress
screen -r pid:
C-A d: save the workshop
C-A k or K: delete current screen
C-A ?: all shortcut
C-A K: close all screen
change session name:
C-A,then :sessionname testname
C-A A: change the window title
-----------------------------------------
delete soft link:
rm linkname, no /
-----------------------------------------
7/31/2010
unable automount in fedora and give the following error:
    org.freedesktop.PolicyKit.Error.NotAuthorized

resolution: run polkit-gnome-authorization as user, change
    mount files system from removable device
    mount a device
----------------------------------------
seperately check the usage of each cpu kernel 
top then 1
---------------------------------------------------------------------
8/3/2010
how to generate animation by ncl and convert it to gif
1. download the example animate_1.ncl from ncar, and change the output file type as ncgm
2.run ncl filename.ncl, and file.ncgm will be generated which can be viewed by idt from ncl
3. download the scrip file ncgm2gif, maybe script gifmerg also be needed.
4. run ncgm2gif file.ncgm, and gif will be generated

---------------------------------------------------------------------
8/6/2010
compiler netcdf with intel c/c++ and fortran

#!/bin/sh

export CPP='icc -E'
export CXXCPP='icpc -E'
export CC=icc
export CXX=icpc
export CPPFLAGS='-DNDEBUG -DpgiFortran'
export CFLAGS='-O3 -xT -ip -no-prec-div -static -no-multibyte-chars'
export CXXFLAGS='-O3 -xT -ip -no-prec-div -static -no-multibyte-chars'
export FC=ifort
export F77=ifort
export F90=ifort
export FFLAGS='-O3 -xT -ip -no-prec-div -static -no-multibyte-chars'
export AR=xiar
export LD=ifort
export LDFLAGS='-O3 -xT -ip -no-prec-div -static -no-multibyte-chars'
./configure&&make && make install
------------------------------------------------------------------
install netcdf for mac 
setenv CPP "cpp -C -P -xassembler-with-cpp -traditional"
setenv CC icc
setenv CXX icpc
setenv CPPFLAGS '-O3 -DNDEBUG -DpgiFortran'
setenv CFLAGS '-O3 -xT -ip -no-prec-div -no-multibyte-chars -m64 -w'
setenv CXXFLAGS '-O3 -xT -ip -no-prec-div -no-multibyte-chars -m64 -w'
setenv F77 ifort
setenv F90 ifort
setenv F95 ifort
setenv FCFLAGS '-O3 -xT -ip -no-prec-div -no-multibyte-chars -m64 -w'
setenv FFLAGS '-O3 -xT -ip -no-prec-div -no-multibyte-chars -m64 -w'
setenv AR xiar
setenv LD ifort
setenv LDFLAGS '-O3 -xT -ip -no-multibyte-chars -m64'

./configure --prefix=/your/desired/install/directory
make
make check
make install
--------------------------------------------
ebook download:
-------------------------------------------------
utf8文件乱码 using vim 7.3 installed from source?
solution:./configure --prefix=/usr --enable-multibyte
-------------------------------------------------
流量即时监视

iptraf
ifstat
nload
----------------------------------------------
wordpress admin
------------------------------------------
bash终端读入数据
read var
-----------------------------------------
clm3.0修改

Makefile line557
-lmpi-->-lmpich
jobscript file :line 388
remove -v
clean:
cd $run
-------------------------------------------
install chm2pdf
------------------------------------------
2010/8/28
update ports and the software

sudo port -v selfupdate
sudo port upgrade outdated

porticus GUI for MacPorts
reload the porticus 
-------------------------------------------
quick look plugins for preview in folders: Folders, EPS and  zip

copy these qlgenerator files to /Library/QuickLook or ~/Library/QuickLook
--------------------------------------------------------------
8/28/2010
change the hosts in the network and make it work by restart network
----------------------------------------------------------------------------
doxygen
1.generate Doxygen file
doxygen -g 
2.modify Doxygen file
FILE_PATTERNS          = *.h *.c *.cpp *.F90 *.f *f90 *.F
RECURSIVE              = YES
INPUT                  = /Usf/sdf
-------------------------------------------------------------------------
problem like
Portfile changed since last build; discarding previous state.
--->  Computing dependencies for gettext
--->  Configuring gettext
Error: You cannot install gettext for the architecture(s) x86_64 because
Error: its dependency expat only contains the architecture(s) i386.
Error: 
Error: Did you upgrade to a new version of Mac OS X? If so, please see
Error: 
Error:    
Error: 
Error: Target org.macports.configure returned: incompatible architectures in dependencies
Log for gettext is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gettext/main.log
Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade coreutils failed
To report a bug, see <

solution: 
ref:
-----------------------------------------------------------------------------
iweb idvd无法启动?
将Library/Preferences/com.apple.iWeb.plist移出来
或者 Library/Preferences/com.apple.iDVD.plist移出来
---------------------------------------------------------------------------------
9/4/2010
增加latex中array的行间距
\renewcommand\arraystretch{1.3}
or
直接在\\后面加尺寸,如\\[0.5cm]
------------------------------------------------------------

Import 11: How can I import references from Google Scholar?

Answer: You will need to configure Google Scholar to send references to EndNote. Then you will be able to send references to EndNote by clicking on the "Import into EndNote" link.

Follow these steps to configure Google Scholar to send references to EndNote:

   1. Go to the Google Scholar home page at
   2. Click on the "Scholar Preferences" link.
   3. Under "Bibliography Manager" select the option "Show links to import citations into" and choose "EndNote" in the drop down box.
   4. Click on the "Save Preferences" button.

Follow these steps to import search results into EndNote:

   1. After performing a search on Google Scholar click on the "Import into EndNote" link for the reference you want to import.
   2. If you are presented with a window asking if you want to "Open" or "Save" the file, choose to open the file.
   3. A "Select a Reference Library" window will appear, use this window to select the EndNote library you want the reference imported into.

--------------------------------------------------------
开启ipv6 on macosx
 SystemPreference->network->add 6-4 network and apply, run "ping6 -c5 ::1 " in terminal, should be ok
--------------------------------------------------------
install chm2pdf with yum in fedora, no spaces in filename 

chm2pdf --continuous *.chm *.pdf
------------------------------------------------------------------------------
9/18/2010
output the date type
date +%y:%m:%d-%H:%M
--------------------------------------------------------------------------------
download all files from website
speed download-> Queue-> Add files from URL
------------------------------------------------------
errors: ifort: error #10001: could not find directory in which g++ resides
or 
Loaded plugins: refresh-packagekit
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 311, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 168, in main
    base.doLock()
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1225, in doLock
    while not self._lock(lockfile, mypid, 0644):
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1284, in _lock
    os.write(fd, contents)
OSError: [Errno 28] No space left on device

solution: check if there's spaces in your harddisk
------------------------------------------------------------
9/26/2010
windows解压tar包乱码?
solution: 使用7za命令行压缩
7za a -tzip file.zip files
-----------------------------------------
find . -atime -1h30m
     -atime n[smhdw]
             If no units are specified, this primary evaluates to true if the difference between the
             file last access time and the time find was started, rounded up to the next full 24-hour
             period, is n 24-hour periods.

             If units are specified, this primary evaluates to true if the difference between the
             file last access time and the time find was started is exactly n units.  Possible time
             units are as follows:

             s       second
             m       minute (60 seconds)
             h       hour (60 minutes)
             d       day (24 hours)
             w       week (7 days)

             Any number of units may be combined in one -atime argument, for example, ``-atime
             -1h30m''.  Units are probably only useful when used in conjunction with the + or - modi-
             fier.
----------------------------------------------------------------------------------------
change f77 to f90 or f95
1. change the continuous line signal \ to &
2. change the comment c to !
0-------------------------------------
 
 --------------------------------
chkconfig 
insert
--------------------------------------
rocks run host "cat /absolutepath/file >> /etc/bashrc"
if not, then user's home dir
-------------------------------------
服务器取消自动挂载?

/etc/auto.master
---------------------------------------
rocks install the os on nodes?
on hn run insert_ethers
then start the nodes using network install
-------------------------------------
开启sge服务?
/etc/init.d/sgemaster.FIO start
------------------------------------
无法自动挂载infinibandhome分区?
/etc/rc.local添加
mount -a
  -------------------------------------
  su - username
  change to user and the path
  -----------------------------------
冷启动或者通过远程计算节点后,自动进入到reinstall?
解决:计算节点冷重启,首先会将/boot/grub/rocks.conf配置文件复制到/boot/grub/grub.conf,然后重启,而其中
默认加载reinstall过程。解决方法修改rocks.conf并将其复制到grub.conf即可
--------------------------------------
新建用户同时增加工作组
useradd -g test phpq
给已有的用户增加工作组
usermod -G groupname username
------------------------------------
查看ssh登录信息
last
----------------------------------
vim copy and paste
esc to vitural mode
v to select, and y copy, then p paste
---------------------------------
wget -nc -r -k   

-P dir到指定目录
-r 递归子目录,但是会导致建立相对路径,取消就可以下载到指定目录
---------------------------------
cut -d' ' -sf15 text.txt
打印以' '为分隔符(-d)的第15个域(-f), -s表示不打印没有分隔符的
---------------------------------
no seq in mac terminal:
sudo port install coreutils
----------------------------
ssh 登录后显示一些欢迎信息
vi /etc/motd
ln gseq seq
-----------------------
开机自动运行
/etc/rc.local中添加
nohup /root/c.sh &
----------------------
send message with terminal

write user@host
-----------------------
vim 折叠
zc      折叠
zC     对所在范围内所有嵌套的折叠点进行折叠 
zo      展开折叠
zO     对所在范围内所有嵌套的折叠点展开
[z       到当前打开的折叠的开始处。
]z       到当前打开的折叠的末尾处。
zj       向下移动。到达下一个折叠的开始处。关闭的折叠也被计入。
zk      向上移动到前一折叠的结束处。关闭的折叠也被计入。
------------------------------------------------
vim 添加某些后缀文件名的彩色显示
如有的时候以file.x命名sh脚本文件,这时没有彩色显示
解决:au BufRead,BufNewFile *.ncl set filetype=ncl
au! Syntax newlang source ~/.vim/syntax/ncl.vim

au BufRead,BufNewFile *.x set filetype=sh

-----------------------------------------------------
man path:
 /etc/manpath
-----------------------------------------------------
12/1/2010

install dmg in termnial
1. hdiutil attach DarwinPorts-1.2-10.4.dmg
2. sudo installer -pkg DarwinPorts-1.2.pkg -target "/Application"
3. uninstall: hdiutil detach /Volumes/DarwinPorts-1.2/
---------------------------------------------------
/etc/profile 登录时自动执行

~/.bash_profile, ~/.bash_login, ~/.profile 登录时自动执行

~/.bashrc shell 登录时自动执行

~/.bash_logout 退出时自动执行

~/.bash_history 记录最近会话中的命令

/etc/passwd 记录用户资源等信息

~/.cshrc 或 ~/.tcshrc 每个shell启动时自动执行

~/.login 执行完.cshrc或.tcshrc后,又登录shell执行

~/.cshdirs 在tcsh.login后执行

~/.logout 在csh 或tcsh退出时执行

-----------------------------------------------------------
删除文件中的所有换行

sed ':a;N;s/\n/ /g; ta' 1.txt
---------------------------------------------------------
12/6/2010
安装 qt+sip +pyqt
1. download and install qt from
2. install python 3.1
./configure  --prefix=/usr/local/python3.1 --enable-framework
make
make frameworkinstall
2.download sip:
python configure.py 
make
sudo make install
3. downlad pyqt source code:
python configure.py -q /usr/bin/qmake 
make
sudo make install
4. export PATH=$PATH:/System/Library/Frameworks/Python.framework/Versions/3.1/bin
5.enjoy
pyuic4 test.ui > test_ui.py
python test.py
pyqt安装位置:/Developer/Applications
6. test pyqt4
PyQt-x11-gpl-4.8.1/examples/demos/qtdemo下运行
./qtdemon

7.安装eric
需要安装qscintilla
 cd Qt4
 qmake -spec macx-g++ qscintilla.pro (不加spec选项不能生成makefile)
 make
 sudo make install
 默认安装至:/Developer/Applications/Qt/translations/
 cd Python
 python configure.py
 make 
 make install
8.安装eric 默认安装目录:/usr/local/bin
sudo python install.py

/Library/Frameworks/Python.framework/Versions/3.1
Q: Error: SIP requires Python to be built as a framework
A: 使用/System/Library/Frameworks/Python.framework/Versions/3.1下python
Q: couldn't find sip*.py, cp the sip* to /usr/local/lib/python*/

Q: ./qtdemo.py : ImportError: No module named qtdemo_rc
A: pyrcc4 -py3 -o qtdemo_rc.py qtdemo.qrc 
注: py3是生成python3的脚本,默认python2,可能不兼容

使用步骤: 1.使用qtdesigner建立窗口,保存ui文件
 2. pyuic4 test.ui > test_ui.py
 3. 建立test.py
  import sys
from PyQt4 import QtCore, QtGui
from test_ui import Ui_Form
class MyForm(QtGui.QMainWindow):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_Form()
       self.ui.setupUi(self)
if __name__ == "__main__":
   app = QtGui.QApplication(sys.argv)
   myapp = MyForm()
   myapp.show()
   sys.exit(app.exec_())
-------------------------------------------------------------
12/8/2010
查看文件建立、修改时间
stat
-------------------------------------------------------------
12/20/2010

install the dterm
shortcut: Cmd + Shift + Enter
insert selected: cmd shift V
---------------------------------------------------------
12/20/2010 
 edit fortran program in xcode
  1. new command line utility
2. right click main.c and delete the reference
3. add new file test.f90
4. done
------------------------------------------------------
vim删除文字到)
要括号:df)
不要括号: dt)
-----------------------------------------------------
按列复制
ctrl+v
select
y
p
----------------------------------------------
discuz ucenter管理

/config/config_ucenter.php:16:define('UC_API', 'http://172.16.3.244/discuz/uc_server');
upload 附件大小设置在php.ini中,filesize
post_max_size = 8M
目录:upload_tmp_dir = "D:/APM/PHP/uploadtemp/"
后台管理用户-用户组-论坛相关(附件相关)

discuz禁止游客访问?
用户-用户组-系统用户组

mysqld忘记密码?

    
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit

# /etc/init.d/mysqld restart
# mysql -uroot -p

-------------------------------------------------------------------------------------
1/13/2011
configure file for automount on mac
/etc/auto_master
-----------------------------------------------------------------------------
删除time machine某项目的备份
点击time machine进入(点击图标), cmd+delete即可,删除过程比较慢
--------------------------------
mplayer播放某些文件没有声音或者无法播放?
看一下.mplayer目录下是否有registry,删掉
----------------------------------------------------------
bash定义数组例子
a=($(seq 10 500))
echo ${a[10]}

declare -a name
name[1]="1"
name[2]="2"

----------------------------------------------------------------------
ssh ip "ls" 运行远程命令
或者
ssh ip << EOF
pwd
exit
EOF
------------------------------------------------------------------
ncl x11 output 窗口背景颜色设置?

  wks = gsn_open_wks("x11","gsun01n")  ; Open an X11 workstation.
  setvalues wks
    "wkForegroundColor" : (/0.,0.,0./)
    "wkBackgroundColor" : (/1.,1.,1./)
  end setvalues
 -----------------------------------
 unalias cp
 --------------------------------------
 vim补全: ctrl+P(向前), ctrl+N(向后)
 ----------------------------------------------------------
无法识别ntfs移动硬盘?
安装新版的paragonntfs8
--------------------------------------------------------
4/9/2011
改变用户主目录
account-rightclick,advanced option
--------------------------------------------------------
4/10/2011
Finder开启剪切功能
安装moveaddict
-----------------------------------------------------------
根据ip判断mac地址
1.ping ip addresss
2. arp -a
-----------------------------------------------------
mpirun 输出只有1个进程编号?
解决:查看mpiexec及mpirun路径是否正确
-------------------------------------------------------
linux 提示too many open files?
参考修改最大打开文件数量的文件
注意:如果改为无限制的话,可能会导致无法登陆
-------------------------------------------------------
gcc编译c程序,设置lib及include目录?
1. gcc a.c -o a -I/xx/xx/include -L/xx/xx/lib
or
2.  export LIBRARY_PATH=$LIBRARY_PATH:/Developer/SDKs/MacOSX10.6.sdk/usr/lib/
   export C_INCLUDE_PATH=/Developer/SDKs/MacOSX10.4u.sdk/usr/include

export  CPLUS_INCLUDE_PATH=
-----------------------------------------------------
4/26/2011 
mail邮件乱码问题?
    选中乱码邮件,修改encoding:gb2312,切换到其他邮箱,在切换回来应该就可以了
----------------------------------------------------
4/27/2011
卸载xcode3,安装xcode4后,itunes无法同步iphone,提示错误:
iTunes was unable to load dataclass information from Sync Services
解决:重新安装itunes即可

-------------------------------------------------------
5/4/2011
mac下制作iso文件
打开磁盘工具(在应用程序>实用工具中),选择文件>新建>文件夹的磁盘映像,或按下Command-Shift-N。接下来选择你的文件夹,之后为映像命名,格式菜单中选择“DVD/CD master”,取消加密后点保存,会得到一个CDR文件而非预期的ISO,只要把扩展名改过来便完成创建了。
如果你的MAC上已经有了一个DMG文件了,通过磁盘工具也能很方便的将其转换为ISO格式。只要选择工具栏上的“转换”即可,用跟上面相同的设置之后再将扩展名改为ISO。
hdiutil convert /path/to/image.dmg -format UDTO -o /path/to/newimage.iso
hdiutil convert /path/to/image.iso -format UDRW -o /path/to/newimage.dmg

mac下播放iso dvd文件
直接用mplayer或者vlc打开iso文件即可


刻录iso镜像文件?
disk utility或者先将iso挂载然后toast刻录
--------------------------------------------------
5/4/2011
视频合并、格式转换
visualhub
-------------------------------------------------
5/5/2011
vim无法使用delete键删除东西?
解决:set backspace=2
-------------------------------------------------
5/6/2011
启动慢?

解决办法如下:
打开你的 Font Book
等几秒钟 你看看列出的所有字体 有些右边有小黑点 那表示重复/冲突 的字体
就是这些字体让你启动慢了20秒左右
按Cmd+A, 全选, 然后右键点 "resolve duplicates" 解决重复字体
然后重启

启动速度会快40%左右
-----------------------------------------------------
5/7/2011
有些html网页无法复制文字
cmd+a全选,然后选择相应的文字即可
------------------------------------------------
5/8/2011
vim中复制到剪贴板?
esc然后v,选择复制的内容,"+y即可复制到剪贴板
-------------------------------------------------
5/11/2011
安装f90tohtml
useage:
------------------------------------------------
5/11/2011
对话框按钮通过tab键切换,然后space确认
-------------------------------------------------
hp打印机恢复出场设置
按住开始键+开机
------------------------------------------------
mathematica8.0 序列号? keygen
-----------------------------------------------
/usr/bin/ld: cannot find -lg2c?
solution: ln -sf libg2c.so.0 libg2c.so
------------------------------------------------
相关参数(由中国教程网会员 vewaals 补充) 
照片规格(英寸) (厘米) (像素) 数码相机类型 1寸 2.5*3.5cm 413*295 身份证大头照 3.3*2.2cm 390*260 2寸 3.5*5.3cm 626*413 小2寸(护照) 4.8*3.3cm 567*390 5 寸 5x3.5cm 12.7*8.9 1200x840以上 100万像素 6 寸 6x4cm 15.2*10.2 1440x960以上 130万像素 7 寸 7x5cm 17.8*12.7 1680x1200以上 200万像素 8 寸 8x6cm 20.3*15.2 1920x1440以上 300万像素 10寸 10x8cm 25.4*20.3 2400x1920以上 400万像素 12寸 12x10cm 30.5*20.3 2500x2000以上 500万像素 15寸 15x10cm 38.1*25.4 3000x2000 600万像素 
常见证件照对应尺寸 
1英寸=25mm×35mm 
2英寸=35mm×49mm 
3英寸=35mm×52mm 
港澳通行证=33mm×48mm 
赴美签证=50mm×50mm 
日本签证=45mm×45mm 
大二寸=35mm×45mm 
护照=33mm×48mm 
毕业生照=33mm×48mm 
身份证=22mm×32mm 
驾照=21mm×26mm 
车照=60mm×91mm
------------------------------------------------
DCR是标清摄像机
HDR是高清摄像机
——SR是硬盘摄像机
——HC是磁带摄像机
——DVD是DVD摄像机
——CX是记忆棒摄像机
PJ也是闪存记录的,亮点是带投影功能
——HVR是专业摄像机
——HD是1080高清摄像机
------------------------------------------------
tree显示文件列表有些中文乱码?
tree -N  
控制层数
-L 2
----------------------------------------------
ctags 当前目录查看
set tags=tags;

set autochdir
------------------------------------------
ps -axjf 查看父进程
--------------------------------------
将内容同时输出到屏幕和文件 
cat a.txt | tee -a out.log
---------------------------------------------
sort 排序
sort -n -k 5  changjiang050_grid.txt | sort -n -k 6 

sort -n -k 2 -t : facebook.txt
apple:10:2.5
orange:20:3.4
banana:30:5.5
pear:90:2.3

我们使用冒号作为间隔符,并针对第二列来进行数值升序排序,结果很令人满意。
------------------------------------------------

查看命令是否成功运行
echo $?查看输出是否为0
--------------------------------------------
强制卸载
fuser -km /mnt/dir
umount -f /mnt/dir
---------------------------------------------------
sed/vim 匹配多个重复的字符
x\{m,n\}
-------------------------------------------------
批量修改图片前缀
for i in *
do
a=${i#*_}
mv $i $a
done
----------------------------------------------------

Hydra HDR PlugIn for Aperture
PortraiturePluginAperture2306
Hydra Plug-In for Aperture

EDIT

PhotoTools 2 Professional Edition
download link: email
dft light
gps2aperture
--------------------------------------------------------
增量备份
tar rvf a.tar file
---------------------------------------------------------

7/20/2011
TERM environment variable not set?
     solution: TERM=linux; export TERM
------------------------------------------------------------
7/21/2011snow leopard升级到 mac lionsnow leopard下直接双击lion包即可,macosx安装还是很人性化的。同时也将imac通过time machine导入的方法,复制系统。
-------------------------------------------------------------
macosx qq提示音太难听?修改声音文件
/Applications/QQ.app/Contents/Resources/msg.aif
-----------------------------------------------------------
macosx mail没有声音?
     system-preference->sound->play user interface...
----------------------------------------------------------
安全起见,mac lion finder中默认隐藏了Library,/usr, /opt, /private, /etc 文件夹,通过如下命令将其显示
     solution: chflags nohidden ~/Library/-------------------------------------------------------------------------------------------
terminal下ls 可以看到文件属性最后有个@符号的是隐藏文件
-----------------------------------------------------------------
diskutil list分区信息
diskutil eraseVolume
diskutil mergePartitions
---------------------------------------------------------------------
macosx下 tar压缩中文文件名,在windows下解压乱码?
solution:  7za a -t7z name.7z folder
---------------------------------------------------
cp -v 显示复制明细
---------------------------------------------------------
指定时间运行脚本:
iCal,新建事件,指定“重复”频率(比如每周或每月),在“提醒”部分,选择“打开文件”,点击下拉菜单中的“其它...”,在弹出的对话框中选择用于备份的脚本文件。今后,每当指定时间到来时,系统就会自动执行备份命令。
------------------------------------------------------------
查看文件建立时间等信息: stat
指定时间运行脚本:
iCal,新建事件,指定“重复”频率(比如每周或每月),在“提醒”部分,选择“打开文件”,点击下拉菜单中的“其它...”,在弹出的对话框中选择用于备份的脚本文件。今后,每当指定时间到来时,系统就会自动执行备份命令。
----------------------------------------------------------
fedora、vista双系统删除fedora
xp:
MbrFix /drive fixmbr
Vista/win7:
MbrFix /drive fixmbr {/vista|/win7}
---------------------------------------------------------
mac光盘启动:
重启按住option(atl)
--------------------------------------------------------
通过time machine 复制系统到另外一台电脑 (一般要求同类型的)
1. 将time machine 硬盘挂到电脑上,安装盘放入,重启
2. 按住option,选择安装盘启动
3.到安装界面,mac osx installer->utilities->restore from
backup
如果不是同型号
 可以使用 migration assistant
 1. 注意在目标机器上建立一个临时管理员账户,保证目标机器里的账户名与time machine中的不同
-----------------------------------------------------------
1. 不要将照片直接拖入aperture,这样会将照片复制到aperture库中,应该使用import
2. 删除项目并不能删除aperture库中的一些preview等,可以考虑过一段时间删除所有项目及aperture库(在导出所有照片的情况下)
3.删除项目后,在aperture要晴空垃圾箱
4.人脸发黄:aperture-color-选中脸色->sat值
----------------------------------------------------------
terminal中 ctrl+r 搜索最近的命令
-------------------------------------------------------
电源适配器灯不亮,冲不上电?
 原因:  因为线路上的电流干扰,引发了电源的过载保护。把充电器从插座拔下,放60秒以上,再插上。这样可以重置充电器状态>。
---------------------------------------------------------------------------------------
查看文件建立时间等信息: stat
------------------------------------------------------------
取消export设置的环境变量?
    unset
--------------------------------------------------------------
finder 中按照日期搜索?
    输入数字,如8或者yesterday,然后选择日期即可,按照文件格式搜索,类似
--------------------------------------------------------------
mac双击运行脚本?
重命名为name.command即
-------------------------------------------------------------------------------
8/9/2011
chrome同步信息查看:
----------------------------------------------------------------------------
cp -v: verbose mode
cp -u: update mode
-----------------------------------------------------------------------------
rsync -avz source target
     -R fullpath
rsync 本地full path备份?
     rsync -R    `pwd`/file .
-------------------------------------------------------------------------------
shell读取文件
     while read a
     do echo $a
    done <  
-------------------------------------------------------------------------------
8/10/2011
 添加/Users/XX/myscript到path,建立cluster配置文件备份程序,目标:~/backup/cluster
----------------------------------------------------------------------------------------------------------------------------------------
port install unison 双向同步工具
------------------------------------------------------------------------------
usermod 修改用户命令,可以通过usermod 来修改登录名、用户的家目录,群组等
     usermod -d newhome -m username
     usermod -G newgroup username
groupmod 修改群组信息
查看user信息: id username
或者使用如下命令关闭用户账号:
passwd peter –l
重新释放:
passwd peter –u
-------------------------------------------------------

apache文件列表设置密码:

touch .htpasswd

chmod600.htpasswd

htpasswd .htpasswd jun (htpasswd-n jun查看)

  创建好用户后,他们就可以访问这个目录及其子目录了,但我们还需要在要保护的文件夹下添加一个.htaccess文件,内容如下:


AuthName "Please authenticate in order to access the contents of this folder" 

AuthType Basic

AuthUserFile /full/path/to/.htpasswd

Require valid-user

http.conf中:

  Options FollowSymLinks

  AllowOverride All

------------------------------------------------------

8/20/2011

maclion默认会保存应用程序的状态,但是有时出错后,再打开还是报错。

解决:可以考虑在generalpref不要保存状态

     同时,删除保存在~/Library/Saved Application State/中相应状态文件

------------------------------------------------------

8/22/2011

final cut 导入dv中mts文件?    

解决:1.将dv连接到mac,并设置到观看视频、照片模式,选择usb连接

     2. 打开finalcut-》file->log and transfer, 等待一会儿就会出现所有视频了

    3.这时候选择你想要的片段 单击Add Clip To Queue就可以批量转码了...注意不可以选择出入点 多声道的自动被Mix为立体声 容量扩大10倍

        4. 可以导入整个片段,或者设置出点、入点,具体mov存放位置: /Final cut Document/caperture stratch/project name下


dv中视频保存方法:

  final cut专成mov文件比mts文件大好几倍,可以将mts文件保存到电脑,需要视频编辑的时候final cut log and transfer,剪辑完后,删除相应的mov文件。这样可以节省很多空间

     mplyerx可以播放mts文件

     照片位置:dcim下

-----------------------------------------------------------------------------

8/28/2011

同步照片文件夹到外置硬盘,备份

rsync -avz  photo /Volumes/photo\ backup/


或者 photobak ,脚本见myscript/photobak

----------------------------------------------------------------------------

su -


yum -y update


yum -y install gcc make kernel-headers kernel-devel


shutdown -r now


# wait some secs...


# login as root


/usr/bin/vmware-config-tools.pl

-----------------------------------------------------------------------------

9/1/2011

final cut截屏,导出图片文件

选好出点入点,截图输出,在文件-导出—quicktime变化-选择静态图像,就可以了

-----------------------------------------------------------------------------

9/2/2011

eject/mountDisk, umount/mount from terminal?

     1. diskutil list 查看磁盘情况

     2. diskutil eject /dev/disk1 退出整个磁盘

         diskutil umount /Volumes/name 退出某个分区

          diskutil mountDisk /dev/disk1 挂载整个磁盘 

          diskutil mount /dev/disk1s1 挂载分区

-----------------------------------------------------------------------------

9/2/2011

mac下英文界面,更改某些软件的语言界面?

     language switcher软件

----------------------------------------------------------------------------------------

Fortran: A specification statement cannot appear in the executable section?

solution: 声明变量需在执行语句前面

--------------------------------------------------------------------------------------

from f77 to f90?

     换行符:$-->&

     注释行: c or C to !

=------------------------------------------------------------------------------

9/17/2011

xcode fortran?

Launch Xcode-->create new Xcode project--> Mac OS X Application,Command Line Tool-->Name for the project(C type)--> select the locaion for the project--> Create.


Delete the main.c file that has been created by default and select File-->New--> New file-->Other-->Empty--> Name the file with a fortran extension(for example Main.f90).


Write something(hello world program), then select Product--> Build(or press cmd+B), it should build fine,then select Product --> Run(or press cmd+R) to maka it run.

--------------------------------------------------

9/23/2011

find 按照修改时间搜索?

   -amin n

  查找系统中最后N分钟访问的文件


  -atime n

  查找系统中最后n*24小时访问的文件


  -cmin n

  查找系统中最后N分钟被改变文件状态的文件


  -ctime n

  查找系统中最后n*24小时被改变文件状态的文件


    -mmin n

  查找系统中最后N分钟被改变文件数据的文件


  -mtime n

  查找系统中最后n*24小时被改变文件数据的文件

-------------------------------------------------------------

only backup files latest modified using my script:

for i in `find  . -mtime -3d -type f`;do  bak  "`pwd`/$i" ; done

----------------------------------------------------------

for i in `find . -mtime -3d -type f`; do rsync -avz  -R "$i" ~/path/; done

-------------------------------------------------------------------------------

10/13/2011

经常需要实时查看最近的日志文件?

写了如下的bash脚本,简单实用,并将其命名为tl,即tail last modified file

 #!/bin/sh

     # using tail to show the last modified file, such as a.log.

     echo   "------------------\n"

     echo   "show last modified file dynamically"

     FileName=`ls -ltrh | tail -n1 | awk '{print $NF}'`

     if [ ! -f $FileName ]

         then

             echo "ERROR: \"$FileName\" Not a file last modified"

             exit

         else

             tail -f `ls -ltrh | tail -n1 | awk '{print $NF}' `


------------------------------------------

10/14/2011

使用adobe acrobat pro文本编辑(touch up text tool)出现如下错误

     "All or part of the selection has no available system font. You cannot add or delete text using the currently selected font." 

解决:

  1. Choose Tools > Advanced Editing > TouchUp Text Tool.
  2. Select the text(仅仅选中要编辑同一字体的几个文字,否则会出错) that you want to edit with this tool and right-click (Windows) or Command+Click (Mac OS), and then choose Properties.
  3. In the TouchUp Properties dialog box, select the Text tab.
  4. In the Font pop-up menu, select a Font consistent with the current font you are using. (The fonts listed are the fonts that are available on your system.) You can choose to embed the font into the document by checking the Embed checkbox. Or, you can choose a subset of only the characters you want to add by checking the Subset checkbox (which keeps the file smaller).

------------------------------------------------------------------------------------

10/29/2011

Final cut Pro X格式导出

     可以直接导出为dvd格式的img文件,然后再刻录

     或者导出movie,然后使用视频格式转换软件压缩成mp4

     导出apple device会非常慢,尽量少用

--------------------------------------------------------------------------------

10/30/2011

mac lion比较慢优化!

     1。 打开用户偏好设置,去掉用户不需要的登陆项

2. 去掉不必要的加载项

     系统级的可以在/Libaray/LaunchAgents和/Libray/LaunchDeamons文件夹下面找到,都是plist属性描述文件。

  当前用户级别的可以在~/Libaray/LaunchAgents和~/Libray/LaunchDeamons文件夹下面找到 。

找到你不需要的,将其删除即可。或者是在其下面建立一个子目录,将描述文件放到子目录里面,这样就不会加载了

------------------------------------------------

11/3/2011

lion下剪切:

cmd+c and then  cmd+option+v

------------------------------------------------------------------------------------------

11/4/2011

修改hosts,icloud完美显示地图

将如下内容复制到/etc/hosts即可

#apple Google Map

203.208.46.147

203.208.46.147

203.208.46.147

203.208.46.147

203.208.46.147

203.208.46.147

--------------------------------------------------------------------------------------------------------

11/10/2011

mac ssh登陆服务器中文乱码?

     mac中LANG=en_US.UTF-8

远程 LANG=en_US,将其改为en_US.UTF-8,并加到.bashrc中即可

---------------------------------------------------------------------------------------------------------

11/11/2011

查看ip对应的mac地址

ping 1.1.1.1

arp -a

-----------------------------------------------------------------------------------------------------------

11/12/2011

papers修改设置,导入pdf文件时,修改文件名

-----------------------------------------------------------------------------------------------------------

11/12/2011

使用iCloud同步文档

~/Library/Mobile Documents

------------------------------------------------------------------------------------------------------------

安装MaME OSX游戏模拟器

rom文件放到~/Library/application support - mame os x - roms

---------------------------------------------------------------------------------------

11/13/2011

 将大文件分卷压缩?

     betterzip

---------------------------------------------------------------------------------------

11/14/2011

查看linux版本号

cat /etc/issue 或者 lsb_release -a

uname -a 查看其他信息

-------------------------------------------------------------------------------------------

11/16/2011

copy 为链接,而不是复制文件

cp -l

复制链接时直接复制即可

----------------------------------------------------------------------------------------------

----------------------------------------------------

beamer latex使用verbatim

\usepackage{verbatim}

\begin{frame}[fragile]

\begin{verbatim}

code goes here...

\end{verbatim}

\end{frame}

---------------------------------------------------

查看uid,gid

id

--------------------------------------

安装netcdf需要hdf5?

     安装hdf5,设置export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/hdf5-1.8.7/include/

-----------------------

install lapack and blasé on mac at /usr/local/lib


--------------------------------------------------

1/22/2012

final cut pro x强制关闭重新打开工程没有了?autosave文件也打不开,重启final cut也不行。

解决:试一下重启机器


final cut pro x 到处dvd要差不多2个小时,可以尝试在导出的时候选择后台提交到compressor

--------------------------------------------------------

endnote word参考文献前面添加序号?

     endnote-style文件-->bibliorgraphy->layout->start reference with->[bibliorgraph number]


------------------------------------------------------------

2/11/2012

将视频导出为gif?

     cinegif


----------------------------------------------------------

显示文件file奇数行的内容:


sed -n '1,$p;n' file

awk 'NR%2!=0' file


显示文件file偶数行的内容:


sed -n '1,$n;p' file

awk 'NR%2==0' file

------------------------------------------------------------------------------------------------------------

2/13/2012

windows下word2010使用endnote后,编辑特别慢?

     解决:word选项->校对->在word中更正拼写和语法时->将“键入时标记语法错误”不选中

-----------------------------------------------------------------

2/24/2012

iphone导入照片视频到mac osx

image capture

--------------------------------------------

3/2/2012

mac finder隐藏、显示特定的文件及文件夹

隐藏及反隐藏的命令

隐藏命令

sudo chflags hidden 加完全路径

例如:sudo chflags hidden /Applications/FaceTime.app

翻隐藏命令

sudo chflags nohidden 加完全路径

例如:sudo chflags nohidden /Applications/FaceTime.app

-----------------------------------------------------

3/20/2012

科技论文中矢量图的使用

1.如果原始图片是pdf、eps等矢量图格式,可以使用illustrator等软件编辑

2. 在word或者ppt中修改的方法

     a. 使用preview将pdf文件存为tiff格式(使用lzw压缩,500dpi,甚至300dpi足够了)

     b.将tiff图片放到ppt或者word中编辑,然后另存为emf等矢量图格式,也可存为tiff位图格式

     c.用illustrator将emf格式转存为pdf格式,

     d.使用preview裁边,然后存储pdf,及导出tiff格式

     注:在ppt中另存为图片为tiff或者png时,分辨率为实际的屏幕分辨率,可以通过设定页面大尺寸来提高另存图片的质量

---------------------------------------------------------------------

3/21/2012

升级到texlive 2011

1.复制自己定制的beamertheme

2. 添加中文字体

     add ttf chinese fonts for mac texlive 2009


    1.downloads cmactex.tar.gz from

    2.copy chinese fonts (simsun.ttf, simkai.ttf, simhei.ttf, simfs.ttf, simli.ttf, simyou.ttf) to /usr/local/texlive/2008/texmf-dist/fonts/truetype/Chinese

    3. cd ~/.texlive2008/bin

    4. ./mkexpfonts (see this script for details)

    5.  mktexlsr

         updmap --syncwithtrees

         updmap

3.将ctex中的cct目录复制到/usr/local/texlive/2011//texmf/tex/latex/cct

---------------------------------------

Endnote如何去掉域代码生成纯文本文件

现在很多杂志都要求作者提供电子文稿。格式化后的文稿含有大量域代码,有可能与杂志社的软件不兼容,因此提交前需要去掉文稿里的域代码。方法是从Word的工具栏里进入“EndNote 7.0”子菜单选择点击“Remove Field Codes”,出现一个提示框告诉你“该操作将创建一个新的去掉了所有域代码的Word文档,原文件仍然打开且无改动”,点击“确定”将新文件存到指定地点。新文件内容和原文件完全相同,只是无域代码,因此不能再对引文进行格式化。

----------------------------------------------

4/5/2012

macfuse+macfusion,无法成功挂载远程服务器?

     sshfs产生错误no kext?

解决:卸载macfuse,安装fuse4x

---------------------------------------------------------

4/5/2012

mac finder中选中文件按一下空格可以预览文件,但是切换到其他软件的时候,预览窗口会消失。

解决:

-------------------------------------------------------------------------------------------------------------

4/6/2012

date +%Y%d

-------------------------------------------------------------------------------------------------------

运行cesm run出现如下错误:

ls: No match.

Model did not complete - no cpl.log file present - exiting

解决:这是由于cesm默认是64个进程,run脚本中设置的进程数不是64引起的。

 法一:将run脚本中使用mpirun -np 64

 法二:修改case下的env_mach_pes.xml,将进程数改为需要的数值


-------------------------------------------------------------------------------

4/10/2012

EvoCam监视

打开EvoCam,然后选择打开配置文件,actions中选择检测sensor并发送邮件

或者streaming enable server

------------------------------------------------------------------------------------------

4/12/2012

将当前目录添加到path,可以直接运行可执行文件,不需要./

export PATH=$PATH:.

--------------------------------------------------------------------------------------------

4/16/2012

在 Aurora 中如何使用中文

对于CTeX 2.8/2.9 而言,在 Aurora中使用中文需要重新配置字体,在默认为TrueType字体下是不能正确输出中文的。

 

1) 开始菜单—CTeX—FontSetup—勾选上“生成Type1字库”和“使用Type1字库”这两个选项,重新配置字体,完成安装。

 

2) 在打开的 Aurora 对话框中选“Properties——>Packages”,添加宏包“\usepackge{ctex}”。

 

3) 在数学环境中使用“\text{中文}”输入中文。

 

即可正确输出中文。

--------------------------------------------------------------

4/18/2012

mac下acrobat打印机打印后文件位置?

选择最下面的printer,然后save as pdf

---------------------------------------------------------

4/19/2012 word某页横向?

  在一篇WORD文档中,如何使其中的一页页面设置成横向?

  您首先打开要编辑的文档,或者新建文档也行。

  把鼠标插入点停在要变成横向页面的前一页,比如你要把第4页变成横向的,就要把鼠标放在第3页上,任何位置都行。

  然后点“文件”---“页面设置”---“页边距”栏目下面有页面纵横选项,选择“横向”,在“应用于”选项中选择“插入点之后”,然后点确定。

  这时第4页之后的所有页都变成横向的了。然后再把鼠标插入点放在第4页上。

  点“文件”---“页面设置”---“页边距”栏目下面选择“纵向”,在“应用于”选项中选择“插入点之后”。

  这样整个文档只有第4页是横向的了。

---------------------------------------------------------------

4/27/2012

word中插入图片

     1.png, tiff等位图格式效果稍差,如果有矢量图最好

     2. ncl输出为eps,可以直接插入word,但是对于使用adobe acrobat输出的eps则无法插入word,只是在word显示为一个图标,可以

          考虑使用illustrator打开pdf或者eps文件,然后另存为eps文件,就可以插入word了

     3. 如果eps还是无法导入word,可以考虑用adobe acrobat打开pdf文件或者eps文件,打印成pdf,然后导出为eps,如果eps文件有空白,

          使用gsview打开,pstoeps,保存可

     4.ncl输出多张图片存为ps,使用psselcet -p4 a.ps选取第四张保存为ps,然后使用gsview处理,pstoeps,转为eps、并去掉空白

          步骤四4可能会导致图片可以显示,但是打印不出来。如果不行,可以尝试直接使用gsview打开ps文件,选取相应的图片,存为eps,看能否插入word打印,如果不行,就用ai打开

               得到的eps文件,另存为eps即可。

          ncl输出多张pdf图片,可以使用adobe pdf打开,只选择相应的页面,然后另存为eps也可

注意: R输出为pdf文件,可以使用acrobat 打印成pdf,然后用illustrator打开pdf文件,导出为eps文件,就可以插入word了,此时eps文件比较大、可能还会有空白,可以使用gostview打开eps文件,pstoeps,另存为eps就没问题了。

-------------------------------------------

文本格式的数据导入word表格?

     excel中数据-》来自于文本-,然后复制到word表格即可

--------------------------------------------------------------------------------

%s///g

---------------------------------

find . -mtime -2d -print0 | rsync -av --files-from=- --from0 . temp/

-----------------------------------------------------------

aperture删除插件?

     从如下目录找到相应的插件删除即可

/Library/Application Support/Aperture/Plug-Ins

~/Library/Application Support/Aperture/Plug-Ins

---------------------------------------------------------------------

5/28/2012

查看linux硬件

lspci

阅读(7985) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~