亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 727 | 回復(fù): 0
打印 上一主題 下一主題

一些linux小tips(隨時想到隨時加) [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2008-05-28 22:16 |只看該作者 |倒序瀏覽
北京理工大學(xué)  20981  陳罡
一些小技巧,總是容易忘記,寫在網(wǎng)上就不容易忘記了,查起來也方便。我一直使用slackware做為自己的linux桌面環(huán)境,主要原因嘛:
首先,它full install以后基本上配套的源代碼和工具啥的都裝上了,不用再下載kernel自己編譯工具鏈啥的,比較適合像偶這樣的懶人;其次,它的啟動腳本的處理還是嚴(yán)格按照unix的機(jī)制來用習(xí)慣了;軟件管理,生成一個tgz,就可以直接用installpkg, removepkg啥的直接安裝,也馬馬虎虎。多數(shù)軟件都可以從源代碼直接編譯出來,不會缺這少那的。

(1)去掉slackware煩人的“嘀嘀”聲
打開/etc/inputrc,將“set bell-style none”前面的“!苯o去掉。
然后重新登錄一次,于是,整個世界安靜了。

(2)帖一些emacs的簡單配置,省得每次重裝都要滿世界的去找
(custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
'(case-fold-search t)
'(current-language-environment "Chinese-GB")
'(default-input-method "chinese-py-punct")
'(global-font-lock-mode t nil (font-lock)))
(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
)
;; enable cscope support
(add-hook 'c-mode-common-hook
   '(lambda ()
     (require 'xcscope)))
;; python-mode support
(setq auto-mode-alist (cons '("
\\.py$
" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist (cons '("python" . python-mode) interpreter-mode-alist))
(autoload 'python-mode "python-mode" "Python editing mode." t)
(setq font-lock-maximum-decoration t)
(global-font-lock-mode t)
;; get off tool bar
(tool-bar-mode -1)
(setq-default make-backup-files nil)
(show-paren-mode t)
(setq lazy-lock-defer-on-scrolling t)
(setq font-lock-support-mode 'lazy-lock-mode)
(column-number-mode t)
(display-time)
;; replace yes, no selection to y or n directly
(fset 'yes-or-no-p 'y-or-n-p)
(setq visiable-bell t)
(global-set-key [?\S- ] 'set-mark-command)
;; set emacs default frame window size
(setq default-frame-alist (append '((top . 0) (left . 0) (width . 100) (height . 40)) default-frame-alist))
;; highlight selected regions
(transient-mark-mode t)
(put 'upcase-region 'disabled nil)
;; text mode first
(setq default-major-mode 'text-mode)
;; support middle mouse key paste
(setq mouse-yank-at-point t)
(transient-mark-mode t)
;; support open iamge file
(auto-image-file-mode t)
;; shut up
(setq visible-bell t)
;; support mouse wheel
(mouse-wheel-mode t)

(3)對usb鼠標(biāo)滾輪的支持方法
打開/etc/X11/xorg.conf,然后修改Identifier為Mouse1的Sesstion,使其滿足下面的配置:
Section "InputDevice"
    Identifier "Mouse1"
    Driver "mouse"
    Option "Protocol"    "IMPS/2"
    Option "Device"      "/dev/mouse"
    Option "Buttons"   "5"
    Option "ZAxisMapping" "4 5"
EndSection

(4)做為公網(wǎng)服務(wù)器的時候,得到公網(wǎng)ip地址的腳本
#!/usr/bin/python
import os ;
import commands ;
cmd_str = "wget -q -O - www.whatismyip.org | sed -e 's/.*Current IP Address: //' -e 's/ ;
output_str = commands.getoutput(cmd_str) ;
print "public ip is ----> " + output_str ;



本文來自ChinaUnix博客,如果查看原文請點:http://blog.chinaunix.net/u/26691/showart_714736.html
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP